vba - select and copy multiple rows in different columns
Hello,
I tried 3 different ways of selecting and copying data that are in different rows/columns. They all give me error 400, unless they are in the same columns.
Code:
Sub button1()
Application.Union(Range("B14", "B18"), Range("A21", "A24")).Select
Selection.Copy
End Sub
or
Code:
Sub button1()
'Application.Intersect(Range("B14", "B18"), Range("A21", "A24")).Select
Selection.Copy
End Sub
or
Code:
Sub button1()
Range("B14:B18, A21:A24").Select
Selection.Copy
End Sub
Is there a way to accomplish what I am trying to do ?