  In this paper, which is a follow-up to [A. Borobia, R. Canogar, F. De
Ter\'an, Mediterr. J. Math. 18, 40 (2021)], we provide a necessary and
sufficient condition for the matrix equation $X^\top AX=B$ to be consistent
when $B$ is symmetric. The condition depends on the canonical form for
congruence of the matrix $A$, and is proved to be necessary for all matrices
$A$, and sufficient for most of them. This result improves the main one in the
previous paper, since the condition is stronger than the one in that reference,
and the sufficiency is guaranteed for a larger set of matrices (namely, those
whose canonical form for congruence, CFC($A$), includes skew-symmetric blocks).
