Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pam
 
Posts: n/a
Default I need a formula to sum column b if column a is between two dates

I have an excel spreadsheet with employees time off. I need a formula that
will add column b if column a is betwee two dates. For example: if column a
is between 9/22/04 and 9/21/05 then add column b. I have tried all different
formluas but can't get this to work.
  #2   Report Post  
JulieD
 
Posts: n/a
Default

=SUMPRODUCT(--(A2:A100DATEVALUE("9/22/04")),--(A2:A100<DATEVALUE("9/21/05")),B2:B100)

check out
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
for details on the sumproduct function

"Pam" wrote:

I have an excel spreadsheet with employees time off. I need a formula that
will add column b if column a is betwee two dates. For example: if column a
is between 9/22/04 and 9/21/05 then add column b. I have tried all different
formluas but can't get this to work.

  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 18 Apr 2005 09:34:03 -0700, Pam wrote:

I have an excel spreadsheet with employees time off. I need a formula that
will add column b if column a is betwee two dates. For example: if column a
is between 9/22/04 and 9/21/05 then add column b. I have tried all different
formluas but can't get this to work.


=SUMIF(A:A,"="&DATE(2004,9,22),B:B) - SUMIF(A:A,""&DATE(2004,9,21),B:B)

You may find it more convenient to but the Dates into cells, in which case
merely substitute the cell reference for the DATE function in the above.


--ron
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
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
formula - sum "x" column L only when same row contains "y" columns Psalm91jim Excel Worksheet Functions 3 April 12th 05 12:55 PM
Need a 1 Column multiplication formula for 2600 cells. How? Buckle Excel Worksheet Functions 1 March 25th 05 04:17 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
how to enter a formula using column() function for a range Mike Peter Excel Worksheet Functions 6 December 8th 04 07:11 AM


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