Counting values containing part of a cell

D

davidm

I have a list of dates and wish to count the number of times February
appears. If I search for a specific date such as 03 February 2005 I have no
problem but if I wish to find all values containing part of the cell, in this
case the month, I become stuck.
 
F

Fredrik Wahlgren

davidm said:
I have a list of dates and wish to count the number of times February
appears. If I search for a specific date such as 03 February 2005 I have no
problem but if I wish to find all values containing part of the cell, in this
case the month, I become stuck.

Use the MONTH function in a different column to get the month. Use COUNTIF
to count the ocurrences of the month you're looking for.

/Fredrik
 
B

Bob Phillips

=SUMPRODUCT(--(MONTH(A1:A20)=2)

or

=SUMPRODUCT(--(TEXT(A1:A20,"mmm")="Feb"))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
D

davidm

Cheers Bob. That's solved the problem and a lot of frustration in endlessly
trawling through excel help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top