We establish the formulas of the maximal and minimal ranks of the quaternion Hermitian matrix expressionC4−A4XA4∗whereXis a Hermitian solution to quaternion matrix equationsA1X=C1,XB1=C2, andA3XA3*=C3. As applications, we give a new necessary and sufficient condition for the existence of Hermitian solution to the system of matrix equationsA1X=C1,XB1=C2,A3XA3*=C3, andA4XA4*=C4, which was investigated by Wang and Wu, 2010, by rank equalities. In addition, extremal ranks of the generalized Hermitian Schur complementC4−A4A3~A4∗with respect to a Hermitian g-inverseA3~ofA3, which is a common solution to quaternion matrix equationsA1X=C1andXB1=C2, are also considered.