count

  • Thread starter Thread starter Mona
  • Start date Start date
M

Mona

I have daily dates (mm/dd/yyyy) in colA and text in colB. In cell C2 I have
03/2008 (mm/yy). I need a formula : count colB when A:A=C2. Thanks! -Mona
 
Try
=SUMPRODUCT((TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy"))*B1:B100)

If this post helps click Yes
 
Try this:

=SUMPRODUCT(--(MONTH(A1:A10)=MONTH(C2)),--(YEAR(A1:A10)=YEAR(C2)),--(B1:B10<>""))
 
Hi,

Try this. "Sometext" is the String your looking for in column B

=SUMPRODUCT((TEXT(A1:A1000,"mmyy")=TEXT(C2,"mmyy"))*(B1:B1000="Sometext"))


Mike
 
I tried and I get a "#value". I am trying to count the text in colB or
simply count each cell. Thanks
 
Try the below
=SUMPRODUCT(--(TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy")),--(B1:B100<>""))

=SUMPRODUCT(--(TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy")))

If this post helps click Yes
 
I should have added if you want to count anything in column B use this

=SUMPRODUCT((TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy"))*(B1:B100<>""))

Mike
 
Thank you Jacob! This works!

Jacob Skaria said:
Try the below
=SUMPRODUCT(--(TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy")),--(B1:B100<>""))

=SUMPRODUCT(--(TEXT(A1:A100,"mmyy")=TEXT(C2,"mmyy")))

If this post helps click Yes
 
Back
Top