B
Bob Zimski
I don't know why, but the compiler is protesting the second to last line and
I don't know why. What have I missed?
Thanks
For i = maxrows To 2 Step -1
FormulaStr =
"=IF(ISNA(VLOOKUP(cells(i,1),[NegsExceptions.xls]Sheet1!$A$1:$C$18,1,FALSE)),""x"",VLOOKUP(cells(i,1),[NegsExceptions.xls]Sheet1!$A$1:$C$18,1,FALSE))"
Range(Cells(i, 5)).Formula = FormulaStr
Next i
I don't know why. What have I missed?
Thanks
For i = maxrows To 2 Step -1
FormulaStr =
"=IF(ISNA(VLOOKUP(cells(i,1),[NegsExceptions.xls]Sheet1!$A$1:$C$18,1,FALSE)),""x"",VLOOKUP(cells(i,1),[NegsExceptions.xls]Sheet1!$A$1:$C$18,1,FALSE))"
Range(Cells(i, 5)).Formula = FormulaStr
Next i