As I want it to continually loop and add up all the "yes" in that specific column which is (counter2, 7)
Aflatoon's technique is better, but in terms of the original logic ..
Sub YesAmountFile()
Dim TotalYesNum As Integer
Dim TotalYes As String
Dim counter2 As Long
Dim lengthoflist As Long
lengthoflist = Sheets("RawData").UsedRange.Rows.Count
For counter2 = 2 To lengthoflist
If Cells(counter2, 7) = "Yes" Then
TotalYesNum = TotalYesNum + 1 '<<----------------------------- Not CountIf()
End If
Range("t10") = TotalYesNum
Next counter2
End Sub