mmetzinger
Board Regular
- Joined
- Dec 30, 2010
- Messages
- 61
Ok, I am trying to figure out how to increment a R1C1 reference. I am running this code through a loop so I have to move columns for each loop.
Here is an example of my attempted code
Excel doesn't like this code but for the life of me I can't figure out how to input the variable into the lookup formula.
Any ideas on how to use the variable in the lookup?
Thanks,
Matt
Here is an example of my attempted code
Code:
Dim ProductCol As Integer
ProductCol = 1
ActiveCell.FormulaR1C1 = "=Original!R[ProductCol]C & Original!RC[ProductCol]"
Excel doesn't like this code but for the life of me I can't figure out how to input the variable into the lookup formula.
Any ideas on how to use the variable in the lookup?
Thanks,
Matt