FrenchCelt
Board Regular
- Joined
- May 22, 2018
- Messages
- 214
- Office Version
- 365
- Platform
- Windows
Hello,
I'm writing a macro that will fill down a formula, but the column in question is dynamic, so I can't use the typical range that identifies the column by its letter designation. I have the code go so far as to insert the formula in the proper cell using a dynamic reference:
And from there, I'm at a loss on how to fill down the formula to the bottom of the column (which should be anchored based on what is in Column A, since that is guaranteed to always have data all the way to the bottom).
Does anyone have any suggestions?
I'm writing a macro that will fill down a formula, but the column in question is dynamic, so I can't use the typical range that identifies the column by its letter designation. I have the code go so far as to insert the formula in the proper cell using a dynamic reference:
VBA Code:
Range("A2").End(xlToRight).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=-1).Activate
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-50],'4-Week Data'!C[-52]:C[-51],2,FALSE)"
And from there, I'm at a loss on how to fill down the formula to the bottom of the column (which should be anchored based on what is in Column A, since that is guaranteed to always have data all the way to the bottom).
Does anyone have any suggestions?