We help IT Professionals succeed at work.

Dynamic VLOOKUP formula in VBA procedure

177 Views
Last Modified: 2018-12-22
Hello
I have a need for a dynamic VLOOKUP formula within a vba procedure.
I am using, ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-37],Inventory!C[-14]:C[-5],10,FALSE)"
The dynamic part is the [-37] which refers to column A.

How would I change the formula to point to Column A, no matter the cell that the formula gets put into, so it honors the proper value being used in the VLOOKUP?
Please advise and thanks.
Comment
Watch Question

Analyst Assistant
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Yup, this worked!!!  Thanks for the help.