We introduce a scheme to coherently suppress second-rank tensor frequency shifts in atomic clocks, relying on the continuous rotation of an external magnetic field during the free atomic state evolution in a Ramsey sequence. The method retrieves the unperturbed frequency within a single interrogation cycle and is readily applicable to various atomic clock systems. For the frequency shift due to the electric quadrupole interaction, we experimentally demonstrate suppression by more than two orders of magnitude for the ${}^2S_{1/2} to {}^2D_{3/2}$ transition of a single trapped ${}^{171}text{Yb}^+$ ion. The scheme provides particular advantages in the case of the ${}^{171}text{Yb}^+$ ${}^2S_{1/2} to {}^2F_{7/2}$ electric octupole (E3) transition. For an improved estimate of the residual quadrupole shift for this transition, we measure the excited state electric quadrupole moments $Theta({}^2D_{3/2}) = 1.95(1)~ea_0^2$ and $Theta({}^2F_{7/2}) = -0.0297(5)~ea_0^2$ with $e$ the elementary charge and $a_0$ the Bohr radius, improving the measurement uncertainties by one order of magnitude.