I am writing a macro to enter a VLookup formula in a cell and autofill down to the last row. The code that I used to enter the Vlookup formula is as below:
When I execute the macro it gives me an error as below:
Please Login or Register to view this content.
Run-time error '1004' - Method 'Range' of object'_Global' failed
I'll appreciate if someone can help me in resolving this error
I don't know if this can be a reason for the error but the first row with cell location "Range(0,-2)" has no value. There are some other rows in the data that also have no value.
Any help would be highly appreciated.