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)
Something along the lines of
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?
Have a lok at Sumifs instead of Sumif
Sumifs allows multiple conditions
Thank you for the reply but not an option for the version of excel I have.
Try SUMPRODUCT formula - http://chandoo.org/wp/2009/11/10/excel-sumproduct-formula/
If entered exactly as above, this only returns a #VALUE!
=SUMPRODUCT(--(A3:A80="D"),--(date_range>="2010-10-01"),--(date_range<="2010-11-01"),value_range) + Enter
Adjust date and value ranges.
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
<<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.
<<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?
Sorry about confusion I was refering to Oscar's post
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 :)
You must log in to post.