Try this custom function. There may be another way but this seems to work.
Function CountOccurance(row As Long)
Dim ws As Worksheet: Set ws = Sheets("rolling")
Dim myRange As Range, rCell As Range
Dim Count As Long
Application.Volatile
Set myRange = ws.Range("C" & row, "NE" & row)
Count = 0
For Each rCell In myRange
If Not IsEmpty(rCell.Value) Then
If rCell.Column = 3 Then
Count = Count + 1
End If
If rCell.Offset(0, -1).Value = "" Then
Count = Count + 1
End If
End If
Next rCell
CountOccurance = Count
End Function
To use put the formula =CountOccurance(6) in cell NH6. Note that the 6 is for the row number. You will need to put a 7 for row 7, etc
Bookmarks