LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,346
Default Count occurrences of dates

Hi,

By the way the pivot table solution will automatically detect text date
verses real dates and group them differently, alerting you to a problem.

Also the pivot table automatically will run subtotals by year and month.
The month subtotals will automatically appear as the count. To add the year
subtotal select the year field in the pivot table and choose Pivot Table,
Subtotals.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"George Gee" wrote:

Hi Bernard

Thanks for your reply, I've got it sorted now, hundreds of entries
that are just a letter "a", I'm replacing these gradually with a date.

Thanks again
George Gee


"Bernard Liengme" wrote in message
...
Barry's formula is interesting. I would have used
=SUMPRODUCT(--(YEAR(A1:A100)=2000),--(MONTH(A1:A100)=1))
You can see how this is similar to
=SUMPRODUCT(--(YEAR(A1:A100)=2000))

Odd that one works and the other does not. I wonder if one or more cells
do not have real dates.
You say you have 4500 rows. What is the result from =COUNT(A1:A4500) ? If
every cell has a real date value, the result should be 4500.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"George Gee" wrote in message
...
Hi Barry

Thanks for your reply
The first part for the month works fine.
The second part for the year, I'm getting #VALUE!

Only 4500 rows

Thanks again
George Gee


"barry houdini" wrote in message
...
Hello George,

For January 2000 you could use a formula like

=SUMPRODUCT(--(TEXT(A1:A100,"mmmyyyy")="Jan2000"))

for the whole year

=SUMPRODUCT(--(YEAR(A1:A100)=2000))

extend the range as necessary but you can't use the whole column
unless you have Excel 2007







 
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
Count Unique Occurrences Brandon G. Excel Worksheet Functions 3 August 12th 08 12:43 PM
How do I count repeat Occurrences kevhatch Excel Discussion (Misc queries) 5 May 25th 08 02:49 AM
formula to count occurrences Libby Excel Worksheet Functions 5 March 28th 08 06:07 PM
trying to COUNT occurrences when certain criteria is met Allan from Melbourne Excel Discussion (Misc queries) 4 August 2nd 06 11:01 AM
Count unique occurrences of name jhicsupt Excel Discussion (Misc queries) 4 October 5th 05 05:46 PM


All times are GMT +1. The time now is 11:29 PM.

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

About Us

"It's about Microsoft Excel"