copying vertex height to other vertices with different heights

Hello, i have been having a problem for a while now. its like this i have a bunch of vertices with different heights that is different possitions on the Z axis. now i want to all of them put them on the same height on the Z axis, when i try selecting them all and typing a number on the Z axis in the transform pane they just get moved to the avarage height of all the vertices combined. i would like to know if there is a way to all of them put them on the same height.
really urgent problem.

hope somebody has a solution.

Position the curser at the height you want (manually positioning it or select a vertex at the height and Shift+S / curser to selected, or input its location in the properties panel, shortcut N), change the pivot point to the 3d curser (. period key), Select the vertices you want to move and scale them along the Z axis by zero (S Z 0)

wow thanks a lot, i had been struggling with this for months, i should ask more questions here.