bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 313
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I cannot get past this line of code. I keep getting this invalid message. If I just use something like "Range("$A$1:$h$20")" I don't get the error and the macro runs fine. But, I want to use variables as my range is going to vary every time this macro is run. Any help would be greatly appreciated.
VBA Code:
Range(Cells(1, 1), Cells(finalrow, finalcol)).RemoveDuplicates Columns:=Array(email, courseyear), Header:=xlYes