Hi All,
I have been working on VB and I am getting a compilation error in a particular code.
I am trying to use Vlookup to get the data from an array which is in another worksheet, I am able to get the data using the below formula and it is working fine.
Range("E19:E58").Value = WorksheetFunction.VLookup(Range("B19:B58"), Worksheets("Placeholder").Range("C2:F202"), 2, False)
But, I am getting #N/A error, So I have been trying to use ISNA function in the VB, but it is showing the compilation error - Expected: expression. Please help.
Range("E4:E17").Value = IF(ISNA(WorksheetFunction.VLookup(Range("B4:B17"), Worksheets("Placeholder").Range("C2:F202"), 2, False)),0,WorksheetFunction.VLookup(Range("B4:B17"), Worksheets("Placeholder").Range("C2:F202"), 2, False))
And I am getting the error at the IF statement!!!
Bookmarks