Set the same location value only on Z axis for multiple objects

Hello,

is there a way to set many objects Z (or X or Y) transform to a value easily?
‘Copy to selected’ copies all axis’s values, I just would like to set Z coordinates to zero (as an example).

Thanks.