Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
For example in the range A1:A30 I want to count the number of times the
month of February occurs. Try: =SUMPRODUCT((MONTH(A1:A30)=2)*(A1:A30<"")) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Tom" wrote: I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Tom
One way =SUMPRODUCT(--(TEXT(A1:A30,"yymmm")="08Feb")) -- Regards Roger Govier "Tom" wrote in message ... Hi, I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Do you need the <"" test? Would you satisfy the MONTH=2 test if column A
had =""? -- David Biddulph "Max" wrote in message ... For example in the range A1:A30 I want to count the number of times the month of February occurs. Try: =SUMPRODUCT((MONTH(A1:A30)=2)*(A1:A30<"")) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Tom" wrote: I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi David
I would think Max was generalising, in case the OP tried it for January as well, as all blank cells would then be counted (00 Jan 1900) I tried to eliminate that with my posting by including the year (I agree 08 would pick up 1908, but didn't think that likely for the OP). Of course it would have been better if I had used text(date,"yyyymmm")="2008Feb" -- Regards Roger Govier "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... Do you need the <"" test? Would you satisfy the MONTH=2 test if column A had =""? -- David Biddulph "Max" wrote in message ... For example in the range A1:A30 I want to count the number of times the month of February occurs. Try: =SUMPRODUCT((MONTH(A1:A30)=2)*(A1:A30<"")) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Tom" wrote: I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, I was generalizing the expression for the OP, as per Roger's line:
I would think Max was generalising, in case the OP tried it for January as well, as all blank cells would then be counted (00 Jan 1900) But perhaps I should have explained it in the response itself for completeness. Roger, thanks for that favour! -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Thank you all. Both solutions worked without a hitch but I'll be going with Roger's as it gives the option of including a year as well as a moth. Thank you, Tom "Roger Govier" wrote: Hi Tom One way =SUMPRODUCT(--(TEXT(A1:A30,"yymmm")="08Feb")) -- Regards Roger Govier "Tom" wrote in message ... Hi, I'm trying to count the occurrences of any given month in a rage where the cells are in a date&time format. (11/02/2008 11:22:53) For example in the range A1:A30 I want to count the number of times the month of February occurs. I've tried a count(if(mid formula but my brain melted after the 10 attempt. Any help would be greatly appreciated. Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count occurrences of text within a cell | Excel Worksheet Functions | |||
Counting occurrences of specific month | Excel Discussion (Misc queries) | |||
Extra month shown in date count | Excel Worksheet Functions | |||
Count how many persons in a month using a date | Excel Worksheet Functions | |||
how to count the nr of occurrences of a text string in a cell rang | Excel Worksheet Functions |