I'm trying to bring the values from Sheet2 to Sheet1 using VLOOKUP formula (in VBA, after using the formula I copy paste in order to just see the value). But when the cells from Sheet2 are empty I get the "#N/A", which I don't want. What can I do to get the cell empty if there isn't any value, like replace the #N/A with nothing.
I have tried using the IFERROR formula, but I get 0 instead of nothing.
comm.Range(.Cells(2, "C"), .Cells(lr, "C")).FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-2],Sheet2!C[-2]:C[22],3,0),"""")"
0if the cell has a0else you will get a "blank value" - Siddharth Rout