dragontbone
New Member
- Joined
- Sep 28, 2022
- Messages
- 37
- Office Version
- 365
- Platform
- Windows
Im trying to copy down a formula down in VBA using the following code.
I want it to be dynamic enough to know when to stop copying down the formula, but I can't get the formula to copy down the list of data I have without just copying the first line all the way down the list.
VBA Code:
Sub offsetConcatenate()
' This will add the concatenate formula
Dim row As Integer
Dim DateCountCalculator As Integer
Dim MinusStart As String
DateCountCalculator = Range("DateCountCalculator").Value
For row = 1 To DateCountCalculator
MinusStart = Range("Start_Date_Calculator").offset(row - 1, 4).Select
ActiveCell.FormulaR1C1 = _
"=CONCAT(Start_Date_Calculator&ConcatenateDateStart&TEXT(RC[-3],""MM/DD/YYYY""))"
Next row
End Sub
I want it to be dynamic enough to know when to stop copying down the formula, but I can't get the formula to copy down the list of data I have without just copying the first line all the way down the list.