SUMIF date range

jhampel106

New Member
Joined
Oct 2, 2009
Messages
24
Can someone help me with a SUMIF formula? This seems easy enough, but I just can't get it into a concise formula.

Sheet A contains: Beginning Date in cell E2 and Ending Date in Cell F2.
Sheet B contains a list of dates in column L and an amount value in Column V. The entire sheet is sorted assending by date in Column L.

In Sheet A cell K2, I want the sum all the Sheet B, Column V cells only if the value in Column L falls within the date range of Sheet A Column E2 and F2.
Thank you for your help.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Can someone help me with a SUMIF formula? This seems easy enough, but I just can't get it into a concise formula.

Sheet A contains: Beginning Date in cell E2 and Ending Date in Cell F2.
Sheet B contains a list of dates in column L and an amount value in Column V. The entire sheet is sorted assending by date in Column L.

In Sheet A cell K2, I want the sum all the Sheet B, Column V cells only if the value in Column L falls within the date range of Sheet A Column E2 and F2.
Thank you for your help.

Try this below
Sheet1 = Sheet A
Sheet2 = Sheet B
I am not sure how long your list is in column L on Sheet B but i have only gone to 5 in this example.

Code:
=SUMPRODUCT((Sheet2!$L$2:$L$5>=Sheet1!E2)*(Sheet2!$L$2:$L$5<=Sheet1!F2),Sheet2!$M$2:$M$5)

Cheers

John
 
Upvote 0
If using XL2007 or 2010

=Sumifs('Sheet B'!V:V,'Sheet B'!L:L,">="&E2,'Sheet B'!L:L,"<="&F2)

in other versions:

=Sumif('Sheet B'!L:L,">="&E2,'Sheet B'!V:V)-Sumif('Sheet B'!L:L,">"&F2,'Sheet B'!V:V)
 
Upvote 0
By the end of the year, Sheet B will have over 88,000 lines in it, so I need to accommodate a large spread in the range.
 
Upvote 0
The SUMIFS and SUMIF combo are better suited for large ranges than SUMPRODUCT.
 
Upvote 0
=SUMPRODUCT((Sheet2!$L:$L>=Sheet1!E2)*(Sheet2!$L:$L<=Sheet1!F2),(Sheet2!$M:$M))

Chenged slightly to take into account the above!

Cheer, John
 
Upvote 0
Using Sumproduct with whole columns is not advisable... very inefficient for processing.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top