Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
maxtrixx
 
Posts: n/a
Default Get count of records for a particular month and year

I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Select your column of date records, then use Data | Pivot table. Click
through to the end, then drag the date field button to both the row field
and the data field. Then use the Pivot Table button on the pivot table
commandbar, and choose group. Then select month or year, and you will get a
count of dates within each time period.

HTH,
Bernie
MS Excel MVP


"maxtrixx" wrote in message
...
I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.



  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi

i would suggest using a pivot table for this ... click in your data area
choose data / pivot table & pivot chart report
choose next
ensure the correct data range is selected
choose next
click on layout
drag the date field to where it says "row"
drag the records field to where it says "data" and if it says "sum of ...."
double click on it and change it to count
click OK
click finish
now right mouse click on the dates area, choose group & show detail / group
click on month & year and click OK

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"maxtrixx" wrote in message
...
I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.



  #4   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"maxtrixx" wrote in message
...
I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.


I will assume your dates are in column A, row 1 to 10
1) In column B, enter =YEAR(A1) and drag downwards
2) In column C, enter =MONTH(A1)and drag downwards

Now, lets say you want how many dates you have for January 2005
Use this formula:

=SUMPRODUCT((B1:B10=2005)*(C1:C10=1))

/Fredrik



  #5   Report Post  
Jonathan Cooper
 
Posts: n/a
Default

assume your data range is from A1:A100

In B1 type =min(a1:a100) this will tell you the earliest date.
In B2 type =max(A1:A100) tells you latest date.

Now from B3 downward until you've covered the min and max dates, type (or
autofill or by formula) a date for every month that needs to be counted.

Starting in C3,
=SUMPRODUCT((A1:A100=DATE(YEAR(B3),MONTH(B3),1))* (A1:A100<=DATE(YEAR(B3),MONTH(B2)+1,0)))

copy/paste this formula down next to each date in B3 the bottom of your list.

And, if you need a formula to fill down the list

in B3 =min(A1:A100)
in B4 =date(year(b3),month(b3)+1,day(1)) copy/paste this down

must give credit to http://www.beyondtechnology.com/tips100.shtml for the
way to find beginning of and end of month dates w/o using eomonth()



"maxtrixx" wrote:

I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.



  #6   Report Post  
Jonathan Cooper
 
Posts: n/a
Default

Correction:
formula in C3 is:

=SUMPRODUCT(($A$1:$A$100=DATE(YEAR(B3),MONTH(B3), 1))*($A$1:$A$100<=DATE(YEAR(B3),MONTH(B3)+1,0)))


"Jonathan Cooper" wrote:

assume your data range is from A1:A100

In B1 type =min(a1:a100) this will tell you the earliest date.
In B2 type =max(A1:A100) tells you latest date.

Now from B3 downward until you've covered the min and max dates, type (or
autofill or by formula) a date for every month that needs to be counted.

Starting in C3,
=SUMPRODUCT((A1:A100=DATE(YEAR(B3),MONTH(B3),1))* (A1:A100<=DATE(YEAR(B3),MONTH(B2)+1,0)))

copy/paste this formula down next to each date in B3 the bottom of your list.

And, if you need a formula to fill down the list

in B3 =min(A1:A100)
in B4 =date(year(b3),month(b3)+1,day(1)) copy/paste this down

must give credit to http://www.beyondtechnology.com/tips100.shtml for the
way to find beginning of and end of month dates w/o using eomonth()



"maxtrixx" wrote:

I have a column with date records and I need to find out how many
records/month/year. can anyone help me? Thanks.

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
Count the occurances of a month in a range of date fields Keith Brown Excel Worksheet Functions 8 March 14th 05 11:24 AM
Number of records by Month that meet a specific requirement Keith Brown Excel Worksheet Functions 1 February 5th 05 05:42 PM
Count number of days in given month? Bryan Excel Worksheet Functions 10 February 2nd 05 11:44 PM
PivotTable - Count by Month Gigi Excel Worksheet Functions 3 January 1st 05 12:30 PM
Count If Formula Mimi Excel Worksheet Functions 0 November 5th 04 11:55 AM


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