gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
This code is causing me a problem and not sure why. I want to copy the formula in O2 down to the last row
Code:
Sub Add_EOMONTH()
'
Range("O2").Select
ActiveCell.FormulaR1C1 = "=EOMONTH(RC[-2],0)"
'
Dim i As Long
Dim iLastRow As Long
'
'
With Sheets("Potential Awards")
iLastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("O2").AutoFill Destination:=.Range("O3:O" & iLastRow)
End With
End Sub