I have a column which tracks the date of certain expenses and separate column with the expense. Each expense is entered separately, therefore there may be multiple rows with the same date. How can I write a formula to sum the expenses between a predefined date range? Currently, I am entering information as "10/01/2010" and expenses simply as a number.
How to sum a range between certain days of month?
(14 posts) (5 voices)-
Posted 2 years ago #
-
Something along the lines of
=SUMIF(date_range,">=2010-10-01",value_range)-SUMIF(date_range,">=2010-11-01",value_range)
Posted 2 years ago # -
Thank you for the response. It worked great. However, looking further into this, how can I include an additional condition into the function that basically asks:
If A3:A80="D", and then do the same thing with the SUMIF function you provided.
Any idea how I can incorporate this into your function?
Posted 2 years ago # -
Have a lok at Sumifs instead of Sumif
Sumifs allows multiple conditionsPosted 2 years ago # -
Thank you for the reply but not an option for the version of excel I have.
Posted 2 years ago # -
Try SUMPRODUCT formula - http://chandoo.org/wp/2009/11/10/excel-sumproduct-formula/
Posted 2 years ago # -
Use
=SUMPRODUCT(--(A3:A80="D"),--(date_range>=--"2010-10-01"),--(date_range<--"2010-11-01"),value_range)
Posted 2 years ago # -
If entered exactly as above, this only returns a #VALUE!
Posted 2 years ago # -
Try this:
=SUMPRODUCT(--(A3:A80="D"),--(date_range>="2010-10-01"),--(date_range<="2010-11-01"),value_range) + EnterAdjust date and value ranges.
Posted 2 years ago # -
If you are using dates you can't use "2010-10-01" as that is text
=SUMPRODUCT((A3:A80="D")*(date_range>=date(2010,10,1)*(date_range < Date(2010,11,1),(value_range))This will sum up the values in Value_Range where 1/10/2010 <= Date < 1/11/2010
Posted 2 years ago # -
<<If you are using dates you can't use "2010-10-01" as that is text>>
No, but you can use --"2010-10-01" as I showed.
Posted 2 years ago # -
<<If entered exactly as above, this only returns a #VALUE! >>
Did you adjust date_range and value_range to your ranges, and size them the same as A3:A80?
Posted 2 years ago # -
xld
Sorry about confusion I was refering to Oscar's post
Posted 2 years ago # -
Hui,
Yeah, I realised that, but I added it to try and make it clear after Oscar's post as his confused the issue I felt and you (seemed to) support him by offering a different solution.
I tried to clarify it, seems I failed :)
Posted 2 years ago #
Reply
You must log in to post.

