Saladsamurai
08-24-2009, 07:11 PM
Hello there:hi:
I am trying to use an If-then to check and see if the first column of each row reads as follows: T (°F) CFD
If it does, then I increment j. Where am I going wrong?
Thanks!!:hi:
EDITED: typo
Sub WriteEquipmentType()
Dim i, j As Integer
j = 0
For i = 1 To 860
If Worksheets("Raw Data").Cells(i, 1) = "T (" & Chr(176) & "F CFD)" Then j = j + 1
Next i
MsgBox j
End Sub
I am trying to use an If-then to check and see if the first column of each row reads as follows: T (°F) CFD
If it does, then I increment j. Where am I going wrong?
Thanks!!:hi:
EDITED: typo
Sub WriteEquipmentType()
Dim i, j As Integer
j = 0
For i = 1 To 860
If Worksheets("Raw Data").Cells(i, 1) = "T (" & Chr(176) & "F CFD)" Then j = j + 1
Next i
MsgBox j
End Sub