Hi All,
I'm trying to use a macro to transpose blocks of data, then delete the data that was transposed. I've created a macro, but it isn't deleting the rows -- the final step of the macro.
Below is an example of what it looks like.
A1 A1 A2 A3 A4 A5 A6 A7
A2
A3
A4
A5
A6
A7
B1
B2
B3
B4
B5
B6
B7
I would like it to delete the column of As once they've been transposed, which would shift the Bs one row underneath the newly transposed As. The macro, however, is just leaving the column of A's intact, or it's pasting in a specific cell.
here's the macro:
Sub Macro2()
'
' Macro2 Macro
'
' Keyboard Shortcut: Ctrl+Shift+M
'
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("B79").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("A79").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End Sub
I'm assuming the error has to do with the exact cell references. How do I prevent this?
Bookmarks