Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
davidm
 
Posts: n/a
Default Counting values containing part of a cell

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.
  #2   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"davidm" wrote in message
...
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


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

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

or

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

--

HTH

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


"davidm" wrote in message
...
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.



  #4   Report Post  
davidm
 
Posts: n/a
Default

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

"Bob Phillips" wrote:

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

or

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

--

HTH

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


"davidm" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get excel to automatically compute cell values talil Excel Discussion (Misc queries) 2 March 17th 05 04:49 PM
Compare cell values Grant Excel Worksheet Functions 5 February 24th 05 10:54 AM
Counting specific text in a cell Steve Excel Worksheet Functions 7 January 26th 05 05:51 PM
How do I test a cell for part of text East London Excel Worksheet Functions 1 January 26th 05 11:36 AM
Modify Row & Cell Contents based upon Cells Values bpat1434 Excel Worksheet Functions 0 November 7th 04 03:31 PM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"