Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel SUMIF between dates

Tags:

date

excel

sumifs

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

like image 369
spassen Avatar asked Dec 27 '12 15:12

spassen


People also ask

How do I do a Sumif between two dates?

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.

Can you use Sumifs with date range?

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.

How do I create a date range criteria in Excel?

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.

How do I calculate the value between two dates in Excel?

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.


2 Answers

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)
like image 99
Niall Avatar answered Oct 20 '22 20:10

Niall


To SUMIFS between dates, use the following:

=SUMIFS(B:B,A:A,">="&DATE(2012,1,1),A:A,"<"&DATE(2012,6,1))
like image 20
spassen Avatar answered Oct 20 '22 21:10

spassen