Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Need look up of month to get total for the month

Column A has the date mm/dd/yyyy
Column B has the clients name
Coulmn C has the amount paid
Column D is January's total paid and E = Feb, F = March, etc.
I want in the month total columns (D - O) to display the total amount in
column C for each respective month.
So in D1 I want a formula that will look at the date (columnA) and add all
the rows that have January (01/01/2007) as the date added up and entered in
D1. I would copy the formula for each month.
Is there a way to do this? And if so, what is the syntax?
Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Need look up of month to get total for the month


"drumz" wrote in message
...
Column A has the date mm/dd/yyyy
Column B has the clients name
Coulmn C has the amount paid
Column D is January's total paid and E = Feb, F = March, etc.
I want in the month total columns (D - O) to display the total amount in
column C for each respective month.
So in D1 I want a formula that will look at the date (columnA) and add all
the rows that have January (01/01/2007) as the date added up and entered
in
D1. I would copy the formula for each month.
Is there a way to do this? And if so, what is the syntax?


It looks like if you put this formula in D1...

=SUMPRODUCT((COLUMN(D1)-3=MONTH($A2:$A1000))*$C2:$C1000)

and copy it across to O1, it will do what you want. Now, to be clear, the
above is based on an assumption that any date within the month is a match
(not only January 1st as your example showed) and that all of your data is
for the same year (2007 only, not 2007 combined with any other year). By the
way, the two uses of 1000 allow for 1000 rows of data... you should change
them to a whatever number is equal to or larger than the most data you ever
expect to have.

Rick

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Need look up of month to get total for the month

Thanks Rick, it works perfectly!

"Rick Rothstein (MVP - VB)" wrote:


"drumz" wrote in message
...
Column A has the date mm/dd/yyyy
Column B has the clients name
Coulmn C has the amount paid
Column D is January's total paid and E = Feb, F = March, etc.
I want in the month total columns (D - O) to display the total amount in
column C for each respective month.
So in D1 I want a formula that will look at the date (columnA) and add all
the rows that have January (01/01/2007) as the date added up and entered
in
D1. I would copy the formula for each month.
Is there a way to do this? And if so, what is the syntax?


It looks like if you put this formula in D1...

=SUMPRODUCT((COLUMN(D1)-3=MONTH($A2:$A1000))*$C2:$C1000)

and copy it across to O1, it will do what you want. Now, to be clear, the
above is based on an assumption that any date within the month is a match
(not only January 1st as your example showed) and that all of your data is
for the same year (2007 only, not 2007 combined with any other year). By the
way, the two uses of 1000 allow for 1000 rows of data... you should change
them to a whatever number is equal to or larger than the most data you ever
expect to have.

Rick


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
Rolling 12 month total MH Excel Worksheet Functions 7 June 29th 09 06:52 PM
help calculated total for each month jengy1 Excel Worksheet Functions 4 May 13th 09 03:36 PM
count total month per year Brie Excel Discussion (Misc queries) 2 October 23rd 07 11:04 AM
averaging a total out over a month Simon Parker Excel Discussion (Misc queries) 0 April 3rd 07 02:06 PM
12 month Rolling Total Need Help Excel Worksheet Functions 0 September 22nd 06 03:19 PM


All times are GMT +1. The time now is 11:25 AM.

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"