Hi all,
I have a sheet that I copy various columns from and I had been using the row count as a large static value. I'm now checking how much data is there (no need trying to import something that is empty) for have the row count of data.
The below is my the static and my changed variable statements (plus how I set my variable).
However, when I run my macro it says "Wrong number of arguments or invalid property assignment". When I reduce to one column range, "B", it works then adding a second, "H", column range it copies all coloumns from B to H, not B and H. Adding all column ranges I get the error message above.
Any ideas?
Dim CheckRawData
CheckRawData = Cells(Rows.Count, "B").End(xlUp).Row
Range("B2:B20000,H2:H20000,J2:J20000,S2:U20000").Copy
Range("B2:B" & CheckRawData, "H2:H" & CheckRawData, "J2:J" & CheckRawData).Copy
Bookmarks