How can I create macros to shift cells in each direction?
I am using the code below:
- Public Sub ShiftCellsToDown()
- Selection.Insert shift:=xlDown
- End Sub
- Public Sub ShiftCellsToUp()
- Selection.Insert shift:=xlUp
- End Sub
- Public Sub ShiftCellsToRight()
- Selection.Insert shift:=xlShiftToRight
- End Sub
- Public Sub ShiftCellsToLeft()
- Selection.Insert shift:=xlShiftToLeft
- End Sub
However, when I run these macros, only the shift to right works.