Such include LIVEMATCHING (ROUTINE), AB-CB, S. REAL, “O”, HE I & II SHE, LETS ABC1D.
Code: Select all
Sub CountOccurrencesForDate()
Dim wsVaga As Worksheet
Dim wsTblResults As Worksheet
Dim lastRow As Long
Dim i As Long
Dim count As Long
Dim searchDate As Date
Set wsVaga = ThisWorkbook.Sheets("vaga")
Set wsTblResults = ThisWorkbook.Sheets("tblResults")
searchDate = wsVaga.Range("B1").Value
lastRow = wsTblResults.Cells(wsTblResults.Rows.count, "A").End(xlUp).Row
count = 0
For i = 5 To lastRow
If wsTblResults.Cells(i, 1).Value = searchDate And wsTblResults.Cells(i, 4).Value = "SERUM CHLORIDE" Then
count = count + 1
End If
Next i
wsVaga.Range("B2").Value = count
End Sub