How do I....
You can simplify that by using
=SUMPRODUCT(--(TEXT(B2:B1000,"mmm")=A1))
or to guard against if A1 could be either Sep or September
=SUMPRODUCT(--(TEXT(B2:B1000,REPT("m",MIN(4,LEN(A1))))=A1))
note that blank cells score as January so to test for a numerical date in B
might be a good idea
=SUMPRODUCT(--(TEXT(B2:B1000,REPT("m",MIN(4,LEN(A1))))=A1),--(ISNUMBER(B2:B1000)))
--
Regards,
Peo Sjoblom
"Joel" wrote in message
...
Topper: I think you got it close. We need to convert sept to the number
9.
Putting it in a datevalue function will get this result.
=SUMPRODUCT(--(MONTH(B2:B1000)=MONTH(DATEVALUE("1-"&A1&"-07"))))
"Toppers" wrote:
Not sure what exactly you require but ....
=SUMPRODUCT(--(month(B2:B1000)=9))
will give number of dates in B which are September
HTH
"TDW" wrote:
I need to count the number of cells that have dates in them based on
the
month which is listed in column A (months are listed as sept, oct, Nov)
How
can I do this??
|