Hi all,
I would like to ask how can I make the range in a formula in the VBA code becomes a variable, but not hard code it?
My original code:
Range(Cells(2, 44), Cells(bill_lastrow, 44)).Formula = "=VLOOKUP(AQ2,sheet2!$N$1:$O$1144,2,FALSE)"
I would like to make "sheet2!$N$1:$O$1144" as variable, so when the last row of sheet2 not equal to 1144, let say, last row = 2224, it can still work without hard coding it.
Thanks a lot!!