I am receiving a run-time error '1004': on the macro code shown below.
I was adapting some code that I received help here on the board. If someone could point out to me the error I am making on the formula line, I would appreciate it.
Application-defined or object-defined error
-the following line high lights to yellow-
....Range("M" & a).FormulaR1C1 = "=IF(RC9=>1,""YES"",""NO"")"
What I need the code to reflect is IF (Column I cell is greater than 1, ""YES"", ""NO"")
Starting row, would be 7, step to be 2, and the last row to be determined by Column "G", just to clarify the the numbers in column "I", are every 2 rows.
Sub fill_Down_BP_xYN()
Dim LR As Long, a As Long
Application.ScreenUpdating = True
With Worksheets("BP-Proj-Runs")
LR = .Cells(Rows.Count, "G").End(xlUp).Row
For a = 7 To LR Step 2
.Range("M" & a).FormulaR1C1 = "=IF(RC9=>1,""YES"",""NO"")"
Next a
End With
Application.screenUpdating = false
End Sub
Thank you in advance
I was adapting some code that I received help here on the board. If someone could point out to me the error I am making on the formula line, I would appreciate it.
Application-defined or object-defined error
-the following line high lights to yellow-
....Range("M" & a).FormulaR1C1 = "=IF(RC9=>1,""YES"",""NO"")"
What I need the code to reflect is IF (Column I cell is greater than 1, ""YES"", ""NO"")
Starting row, would be 7, step to be 2, and the last row to be determined by Column "G", just to clarify the the numbers in column "I", are every 2 rows.
Sub fill_Down_BP_xYN()
Dim LR As Long, a As Long
Application.ScreenUpdating = True
With Worksheets("BP-Proj-Runs")
LR = .Cells(Rows.Count, "G").End(xlUp).Row
For a = 7 To LR Step 2
.Range("M" & a).FormulaR1C1 = "=IF(RC9=>1,""YES"",""NO"")"
Next a
End With
Application.screenUpdating = false
End Sub
Thank you in advance