Hi
I've written some VBA code which selects then deletes certain columns.
I then want to cut two columns and paste them at the end of the data.
I've written the code below, but Excel doesn't like the last line, where I've selected column U and attempted to paste the columns I'd just cut (columns H and I).
Any ideas why?
TIA
Sub ColumnChanges
Range("C:D,F:J,AB:AB").Select
Selection.Delete
Range("H:I").Cut
Range("U:U").PasteSpecial.Values
End Sub
I've written some VBA code which selects then deletes certain columns.
I then want to cut two columns and paste them at the end of the data.
I've written the code below, but Excel doesn't like the last line, where I've selected column U and attempted to paste the columns I'd just cut (columns H and I).
Any ideas why?
TIA
Sub ColumnChanges
Range("C:D,F:J,AB:AB").Select
Selection.Delete
Range("H:I").Cut
Range("U:U").PasteSpecial.Values
End Sub