Extrude to particular position
I couldn't get m.ardito answer to work.
I wanted to move vertices with different y position to all the same plane.
I found lots of answers on forums with answers like

"select the vertices and press S Z 0 to put all the vertices in the same z-position, then move then set the 'Median Z' value in the transform properties."

I just could not get these to work.

In the end I modified a the script I found.

import bpy
import mathutils


class OBJECT_OT_MoveX(bpy.types.Operator):
    """Move selected vertices to cursor's location"""
    bl_idname = "object.movex_operator"
    bl_label = "Simple Move Operator"

    @classmethod
    def poll(self, context):
        return context.mode == 'EDIT_MESH'

    def execute(self, context):
        MoveSelectedVerticesToCursor(True, False, False)
        return {'FINISHED'}

class OBJECT_OT_MoveY(bpy.types.Operator):
    """Move selected vertices to cursor's location"""
    bl_idname = "object.movey_operator"
    bl_label = "Simple Move Operator"

    @classmethod
    def poll(self, context):
        return context.mode == 'EDIT_MESH'

    def execute(self, context):
        MoveSelectedVerticesToCursor(False, True, False)
        return {'FINISHED'}

class OBJECT_OT_MoveZ(bpy.types.Operator):
    """Move selected vertices to cursor's location"""
    bl_idname = "object.movez_operator"
    bl_label = "Simple Move Operator"

    @classmethod
    def poll(self, context):
        return context.mode == 'EDIT_MESH'

    def execute(self, context):
        MoveSelectedVerticesToCursor(False, False, True)
        return {'FINISHED'}



def MoveSelectedVerticesToCursor(moveX, moveY, moveZ):
    bpy.ops.object.mode_set(mode='OBJECT')

    for vertex in bpy.context.object.data.vertices:
        if vertex.select:
            new_location = https://blenderartists.org/forum/showthread.php?280330-XYZ-location-of-Verticesbpy.context.object.matrix_world.inverted()*bpy.context.scene.cursor_location 
            if moveX:
                vertex.co[0] = new_location[0]
            if moveY:
                vertex.co[1] = new_location[1]
            if moveZ:
                vertex.co[2] = new_location[2]

    bpy.ops.object.mode_set(mode='EDIT') 

class MyPanel(bpy.types.Panel):
    bl_idname = "OBJECT_PT_my_panel"
    bl_label = "Align to Cursor"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    #bl_context = "object"

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        col = row.column()
        view = context.space_data
        col.prop(view, "cursor_location", text="3D Cursor Location")
        #row.prop(bpy.context.object, "OBJECT_OT_delete", text = "Cursor to selected")

        layout.row()
        layout.label(text="Align selected vertices to cursor position", icon='MESH_DATA')
        row = layout.row(align = True)

        row.operator(OBJECT_OT_MoveX.bl_idname, text="X")
        row.operator(OBJECT_OT_MoveY.bl_idname, text="Y")
        row.operator(OBJECT_OT_MoveZ.bl_idname, text="Z")

def register():
    bpy.utils.register_class(MyPanel)
    bpy.utils.register_class(OBJECT_OT_MoveX)
    bpy.utils.register_class(OBJECT_OT_MoveY)
    bpy.utils.register_class(OBJECT_OT_MoveZ)


def unregister():
    bpy.utils.unregister_class(MyPanel)
    bpy.utils.unregister_class(OBJECT_OT_MoveX)
    bpy.utils.unregister_class(OBJECT_OT_MoveY)
    bpy.utils.unregister_class(OBJECT_OT_MoveZ)

if __name__ == "__main__":
    register()