Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default sumif formula based on dates

I have the following partial spreadsheet:

Date Total Hours Compensation
1/15/2008 11.00 $133.43
1/22/2008 12.15 $147.38
2/8/2008 12.00 $145.56

Is there an IF function that can be used to calculate the running total
Compensation by month without using the subtotal function? I would like this
total to automatically calculate when data is added to the spreadsheet.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 171
Default sumif formula based on dates

=SUMIF(A:A,"=" & DATE(2008,1,1),C:C)-SUMIF(A:A,"=" & DATE(2008,2,1),C:C)
That adds the comp from all entries dated on or after 1/1/2008 and subtracts
the total of all entries from 2/1/2008. What's left is the total from Jan
'08. Note that the dates could instead be cell references with the 'from'
and 'until' dates.

"linnipen" wrote:

I have the following partial spreadsheet:

Date Total Hours Compensation
1/15/2008 11.00 $133.43
1/22/2008 12.15 $147.38
2/8/2008 12.00 $145.56

Is there an IF function that can be used to calculate the running total
Compensation by month without using the subtotal function? I would like this
total to automatically calculate when data is added to the spreadsheet.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sumif formula based on dates

One way:

To sum for January 2008:

=SUMPRODUCT(--(MONTH(A1:A10)=1),--(YEAR(A1:A10)=2008),C1:C10)

For other months just change =1 to whatever month number you're interested
in.


--
Biff
Microsoft Excel MVP


"linnipen" wrote in message
...
I have the following partial spreadsheet:

Date Total Hours Compensation
1/15/2008 11.00 $133.43
1/22/2008 12.15 $147.38
2/8/2008 12.00 $145.56

Is there an IF function that can be used to calculate the running total
Compensation by month without using the subtotal function? I would like
this
total to automatically calculate when data is added to the spreadsheet.




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
Sumif Formula - Won't Recognize Dates Dwolko Excel Discussion (Misc queries) 3 August 19th 08 10:21 PM
SumIf formula from one column based on criteria from two other col stanasia Excel Discussion (Misc queries) 13 May 30th 08 08:43 PM
Formula help - indirect & sumif & dates ..... Ray Excel Discussion (Misc queries) 3 August 9th 07 01:56 PM
SUMIF & COUNTIF based on dates Danny Excel Worksheet Functions 10 July 23rd 07 10:36 PM
I want to use sumif to sum up a column based on a range of dates Ricky from Pine Island Excel Worksheet Functions 2 April 13th 07 03:04 PM


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