detriez
Board Regular
- Joined
- Sep 13, 2011
- Messages
- 193
- Office Version
- 365
- Platform
- Windows
I am trying to get this to populate all cells in BJ (not the header cell BJ1) with "USD" when Cells in column B are not blank
This is throwing a Run-time error 424: Object Required error on "If Range....)
This is throwing a Run-time error 424: Object Required error on "If Range....)
VBA Code:
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If Range("B" & i) Is Not Null Then
Range("BJ" & i).Value = "USD"
End If
Next i