Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default Countif month & year

I have 1000+ records over 4 years & want to count how many for each month &
year ie May 2005. Records have specific days 4 May 2005
I can use :
=SUMPRODUCT(--(YEAR(c2:c1000)=2005),--(MONTH(c2:c1000)=4)) to pick up
individual month year, but I want to make life easier & not type in each year
& month (4 years x 12 months & growing!)
Any advice

Saintsman

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Countif month & year

Hi

Ideally, use a Pivot Table and Group the Date filed by Year and Month.
For help on setting up Pivot Tables
Take a look at the following sites
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html

http://www.datapigtechnologies.com/f...es/pivot1.html

http://www.edferrero.com/Tutorials.aspx

If you don't want to use a Pivot Table, use a second sheet and set up a
matrix with 1 to 12 in cells B1:M1
In A2 enter your first year, A3 your next year etc.

In B2
SUMPRODUCT(--(YEAR(Sheet1!$C$2:$C$1000)=$A2),--(MONTH(Sheet1!$C$2:$C$1000)=B$1))
Copy across and down as required.

--
Regards

Roger Govier


"Saintsman" wrote in message
...
I have 1000+ records over 4 years & want to count how many for each
month &
year ie May 2005. Records have specific days 4 May 2005
I can use :
=SUMPRODUCT(--(YEAR(c2:c1000)=2005),--(MONTH(c2:c1000)=4)) to pick up
individual month year, but I want to make life easier & not type in
each year
& month (4 years x 12 months & growing!)
Any advice

Saintsman



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Countif month & year

With
A1: MyDate
A2:A400 containing dates

Try something like this:
Select A1:A400

Then...From the Excel main menu:
<data<pivot table
Check: Microsoft Excel list..........Click [Next]
(A1:A400 is already selected).....Click [Next]
Click the [Layout] button
ROW: Drag the MyDate field here
DATA: Drag the MyDate field here, too
Click [OK]
Click [Finish]

Almost done.....
Right-Click on the MyDate column heading
<Group and show detail<Group
Select MONTH and YEAR.......Click [OK]

Excel will automatically group the dates by YEAR then by MONTH.
The end result will look like this:
Count of MyDate
Years MyDate Total
2007 Jan 11
Feb 9
Mar 10
Apr 10
May 11

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Saintsman" wrote:

I have 1000+ records over 4 years & want to count how many for each month &
year ie May 2005. Records have specific days 4 May 2005
I can use :
=SUMPRODUCT(--(YEAR(c2:c1000)=2005),--(MONTH(c2:c1000)=4)) to pick up
individual month year, but I want to make life easier & not type in each year
& month (4 years x 12 months & growing!)
Any advice

Saintsman

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
Sort month/date/year data using month and date only SMW820 Excel Discussion (Misc queries) 6 June 22nd 06 05:14 PM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
How to use month() and day() without considering year()? Eric Excel Worksheet Functions 5 February 7th 06 03:09 PM
Sum by month and year Steven Robilard Excel Discussion (Misc queries) 2 May 10th 05 03:22 PM
countif number of occurences per month per year. Pete Petersen Excel Worksheet Functions 2 January 4th 05 03:47 PM


All times are GMT +1. The time now is 04:23 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"