Excuse me, again about COUNTIFS
Dim a As String
a = ct.Range("B4").Text ' B4 is formatted as date
Range("C6").Value = Application.WorksheetFunction.CountIfs(rDat, a, rSec, "1")
rDat and rSec are defined ranges (on another sheet).
rDat has the same format as ct.B4 (i.e. date)
I got “0” as a result, but it is wrong.
I tried to remove date format, and format as text – it works.
But I need date format in rDat and B4.
1 Answer