Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Sum based on the dates in a different row.

Another similar kind of problem....I have dates running from 1/1/2007 to
29/6/2007 from C2 to EB2 and I have some values in the row
14 (C14 to EB14). Now I want the sum of all the values. I want the formula
to look for month 1 in row 2 and then return the sum of all the values in
row 14. same for Feb, March, April, May and June.

I entered the following formula.

=SUM(IF(MONTH($C$2:$EB$2)=1,$C15:$EB15))

but it is adding all the values instead of adding the values of January
only. I also dragged it to next column and changed the month to 2 but in
Feb, it shows me 0 and in Jan, it also adds the Feb values.

Please help.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sum based on the dates in a different row.

=SUM(IF(MONTH($C$2:$EB$2)=COLUMNS($A:A),$C$15:$EB1 5))

ctrl + shift + enter, not just enter
copy across the columns


"Gary" wrote:

Another similar kind of problem....I have dates running from 1/1/2007 to
29/6/2007 from C2 to EB2 and I have some values in the row
14 (C14 to EB14). Now I want the sum of all the values. I want the formula
to look for month 1 in row 2 and then return the sum of all the values in
row 14. same for Feb, March, April, May and June.

I entered the following formula.

=SUM(IF(MONTH($C$2:$EB$2)=1,$C15:$EB15))

but it is adding all the values instead of adding the values of January
only. I also dragged it to next column and changed the month to 2 but in
Feb, it shows me 0 and in Jan, it also adds the Feb values.

Please help.



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
how to calculate based on dates? Jack B Excel Discussion (Misc queries) 3 November 15th 06 03:22 AM
how to sum up or count based on dates Syahira New Users to Excel 2 May 11th 06 10:53 AM
Compare multiple dates, can enumerate cell based on most recent date Brian Excel Worksheet Functions 7 May 9th 06 11:02 PM
Lookup based on range of dates dls2193 Excel Worksheet Functions 1 March 30th 06 11:21 PM
Totals based on dates DJ Dusty Excel Worksheet Functions 1 November 16th 04 10:39 PM


All times are GMT +1. The time now is 12:45 AM.

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

About Us

"It's about Microsoft Excel"