I have column A with date values formatted as mm/dd/yyyy
. I am trying to sum the values of column B if A >=DATE(2012,1,1) AND
=SUM(B:B)
sums B properly, but if I try to use =SUMIF(B:B,A:A>=DATE(2012,1,1))
the value returned is 0.00
. I'm assuming this has something to do with using decimal for the sum and date type for the criteria. Is there a way to get around this?
Thanks
How to sum if between two dates in Excel. To sum values within a certain date range, use a SUMIFS formula with start and end dates as criteria. The syntax of the SUMIFS function requires that you first specify the values to add up (sum_range), and then provide range/criteria pairs.
Sum Amounts in Date RangeTo sum amounts based on a date range, you can use the SUMIFS function. SUMIFS is similar the older Excel SUMIF function, which only allows one criterion. Note: In older versions of Excel, you can calculate a SUMIF date range total, like the example shown on the Excel Sum Functions page.
For setting date ranges in Excel, we can first format the cells that have a start and end date as 'Date' and then use the operators: '+' or '-'to determine the end date or range duration.
To find the number of days between these two dates, you can enter “=B2-B1” (without the quotes into cell B3). Once you hit enter, Excel will automatically calculate the number of days between the two dates entered.
You haven't got your SUMIF
in the correct order - it needs to be range, criteria, sum range. Try:
=SUMIF(A:A,">="&DATE(2012,1,1),B:B)
To SUMIFS between dates, use the following:
=SUMIFS(B:B,A:A,">="&DATE(2012,1,1),A:A,"<"&DATE(2012,6,1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With