# SumIf based on a date

#### billyshears

##### Board Regular
I am trying to do a sumif/s between two dates.

A1 is = 11/21/2016
A2 = 11/25/2016

Column C1:C20 = to different dates

Column D1:D20 = to amounts of money

I want B1 to be equal to a sum of all the money equal to or between the dates in cell A1 and A2

I cant seem to get this to work

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### chicagocomputerclasses

##### Well-known Member
Rich (BB code):
``=sumifs(d1:d20,c1:c20,">="&a1,c1:c20,"<="&a2)``

#### CyrusTheVirus

##### Well-known Member
The difference between Chicago's formula and mine is that his includes the 21st and 25th whereas mind does not. I'm not sure what you wanted, but one of the formulas should suffice what you're trying to do.

B1:
Code:
``=SUMIFS(\$D\$1:\$D\$20,\$C\$1:\$C\$20,">"&\$A\$1,\$C\$1:\$C\$20,"<"&\$A\$2)``

 11/21/2016 2299 11/11/2016 1596 11/25/2016 11/12/2016 171 11/13/2016 1724 11/14/2016 373 11/15/2016 127 11/16/2016 96 11/17/2016 1853 11/18/2016 127 11/19/2016 414 11/20/2016 1787 11/21/2016 1931 11/22/2016 1909 YES 11/23/2016 190 YES 11/24/2016 200 YES 11/25/2016 177 11/26/2016 1512 11/27/2016 1170 11/28/2016 1733 11/29/2016 589 11/30/2016 935

<tbody>
</tbody>

Last edited:

Replies
1
Views
92
Replies
1
Views
123
Replies
21
Views
643
Replies
2
Views
120
Replies
1
Views
327

1,190,836
Messages
5,983,166
Members
439,824
Latest member
jr599

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back