Dynamic range for date input

JohannesM

New Member
Joined
Jun 3, 2015
Messages
4
Hi,

I have a report were the user can choose the range by writing the "from week" in one cell and "to week" in another. The only solution I can produce is to take one sumifs for every possible week using offset, but there must be some smarter way of doing this?

This is how part of my dumb formula looks like at the moment and it only covers 3 weeks.
SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;$C$140)+SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;OFFSET($C$140;-1;0))+SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;OFFSET($C$140;-2;0))

Is there a way to get a condition in one single sumifs that says that it should sum if the week is a part of a range as mentioned above?

Tanks in advance!
/Johannes
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
If column G really contains dates, then, using 2 SUMIFS together will cover any range. The logic is:
=SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;">="&start_date)-SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;">"&end_date)
 
Upvote 0
If column G really contains dates, then, using 2 SUMIFS together will cover any range. The logic is:
=SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;">="&start_date)-SUMIFS(Volume!$J:$J;Volume!$B:$B;"Out";Volume!$E:$E;H153;Volume!$G:$G;">"&end_date)

Wow, thanks that was really smart =)
Actually tried to use => but didn´t work since I didn´t know that I had to use the "".
Thanks Glenn and gaz!

Mvh
Johannes
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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