Hello VBA Wizards,
I was hoping someone can help me with the an issue I am having with my VBA.
I am running the following script:
But it is entering =IF(OR(H2=Closed,H2=Cancelled),1,0) in the cell as opposed to entering quotes around Closed and Cancelled. Any ideas on how I can fix this?
I was hoping someone can help me with the an issue I am having with my VBA.
I am running the following script:
Code:
Sub FillRange()
Dim RowCount As Integer
Range("E2").Select
RowCount = Range(Selection, Selection.End(xlDown)).Count
Num = "=IF(OR(H2=" & "Closed" & ",H2=" & "Cancelled" & "),1,0)"
For Row = 2 To RowCount
For Col = 3 To 3
Sheets("Exception File").Cells(Row, Col).Formula = Num
Next Col
Next Row
End Sub
But it is entering =IF(OR(H2=Closed,H2=Cancelled),1,0) in the cell as opposed to entering quotes around Closed and Cancelled. Any ideas on how I can fix this?