|
如题:
自己学着录制的宏,还应该到:D1700 以上的,不知道怎样编写代码。谢谢
Sub Macro2()
'
' Macro2 Macro
' 宏由 laomao 录制,时间: 2011/7/2
'
' 快捷键: Ctrl+h
'
Range("C3").Select
Selection.Cut Destination:=Range("D2")
Range("E3").Select
Selection.Cut Destination:=Range("F2")
Range("G3").Select
Selection.Cut Destination:=Range("H2")
Rows("3:3").Select
Selection.Delete Shift:=xlUp
Range("C4").Select
Selection.Cut Destination:=Range("D3")
Range("E4").Select
Selection.Cut Destination:=Range("F3")
Range("G4").Select
Selection.Cut Destination:=Range("H3")
Rows("4:4").Select
Selection.Delete Shift:=xlUp
Range("C5").Select
Selection.Cut Destination:=Range("D4")
Range("E5").Select
Selection.Cut Destination:=Range("F4")
Range("G5").Select
Selection.Cut Destination:=Range("H4")
Rows("5:5").Select
Selection.Delete Shift:=xlUp
Range("C6").Select
Selection.Cut Destination:=Range("D5")
Range("E6").Select
Selection.Cut Destination:=Range("F5")
Range("G6").Select
Selection.Cut Destination:=Range("H5")
Rows("6:6").Select
Selection.Delete Shift:=xlUp
Range("C7").Select
Selection.Cut Destination:=Range("D6")
Range("E7").Select
Selection.Cut Destination:=Range("F6")
Range("G7").Select
Selection.Cut Destination:=Range("H6")
Rows("7:7").Select
Selection.Delete Shift:=xlUp
Range("C8").Select
Selection.Cut Destination:=Range("D7")
Range("E8").Select
Selection.Cut Destination:=Range("F7")
Range("G8").Select
Selection.Cut Destination:=Range("H7")
Rows("8:8").Select
Selection.Delete Shift:=xlUp
Range("C9").Select
Selection.Cut Destination:=Range("D8")
Range("E9").Select
Selection.Cut Destination:=Range("F8")
Range("G9").Select
Selection.Cut Destination:=Range("H8")
Rows("9:9").Select
Selection.Delete Shift:=xlUp
Range("C10").Select
Selection.Cut Destination:=Range("D9")
Range("E10").Select
Selection.Cut Destination:=Range("F9")
Range("G10").Select
Selection.Cut Destination:=Range("H9")
Rows("10:10").Select
Selection.Delete Shift:=xlUp
Range("C11").Select
Selection.Cut Destination:=Range("D10")
Range("E11").Select
Selection.Cut Destination:=Range("F10")
Range("G11").Select
Selection.Cut Destination:=Range("H10")
Rows("11:11").Select
Selection.Delete Shift:=xlUp
Range("C12").Select
Selection.Cut Destination:=Range("D11")
Range("E12").Select
Selection.Cut Destination:=Range("F11")
Range("G12").Select
Selection.Cut Destination:=Range("H11")
Rows("12:12").Select
Selection.Delete Shift:=xlUp
End Sub |
|