![]() |
condition sumif commands based on date range?
How do I structure sumif commands based on a range of dates in an adjacent
column? |
condition sumif commands based on date range?
Checkout the SUMIFS function, allows multiple ifs.
"joek8724" wrote: How do I structure sumif commands based on a range of dates in an adjacent column? |
condition sumif commands based on date range?
One way...
For all versions of Excel. A1:A20 = dates B1:B20 = values to sum The best way to do this is to use 2 cells to hold the date boundaries. D1 = start date = 1/25/2008 E1 = end date = 3/17/2008 Sum is inclusive of start and end dates. =SUMIF(A1:A20,"="&D1,B1:B20)-SUMIF(A1:A20,""&E1,B1:B20) Or, you can hard code the dates: =SUMIF(A1:A20,"="&DATE(2008,1,25),B1:B20)-SUMIF(A1:A20,""&DATE(2008,3,17),B1:B20) For Excel 2007. =SUMIFS(B1:B20,A1:A20,"="&D1,A1:A20,"<="&E1) =SUMIFS(B1:B20,A1:A20,"="&DATE(2008,1,25),A1:A20, "<="&DATE(2008,3,17)) -- Biff Microsoft Excel MVP "joek8724" wrote in message ... How do I structure sumif commands based on a range of dates in an adjacent column? |
All times are GMT +1. The time now is 12:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com