Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50070

If Error with Vlook Up using VBA

$
0
0
Hey!!

I have a part of a macro mentioned below -

Code:

ActiveCell.Formula = "=VLOOKUP(A" & i & ",Sheet1!A2:B10,2,0)"
I just want to add an iferror before the Vlook up so the same line will look like -

Code:

ActiveCell.Formula = "=IFERROR(VLOOKUP(A" & i & ",Sheet1!A2:B10,2,0),"")"
However, it gets confused with the "". Is there a way I can tackle this problem?

Viewing all articles
Browse latest Browse all 50070

Trending Articles