D
Dustin B
I am writing some VBA code. What I want to do is go through each row of a
sheet and put a the formula =IF(R" & intRowNumber & " = "US", "D", "F").
Basically I want it to check each cell in Column R to see if it is US if it
is put a D in if not put in an F. The code is below.
Private Sub DorF()
Dim intRowNumber As Integer
Dim strCountry As String
For intRowNumber = 2 To Rows.Count
Range("brazil!W" & intRowNumber).Formula = ("=IF(R"& intRowNumber & " =
"US", "D", "F")")
Next
End Sub
Obviously this doesn't work because of all of the quote marks. How do I get
around that.
sheet and put a the formula =IF(R" & intRowNumber & " = "US", "D", "F").
Basically I want it to check each cell in Column R to see if it is US if it
is put a D in if not put in an F. The code is below.
Private Sub DorF()
Dim intRowNumber As Integer
Dim strCountry As String
For intRowNumber = 2 To Rows.Count
Range("brazil!W" & intRowNumber).Formula = ("=IF(R"& intRowNumber & " =
"US", "D", "F")")
Next
End Sub
Obviously this doesn't work because of all of the quote marks. How do I get
around that.