SUM multiple rows based on corresponding drop down lists

stewartc3

New Member
Joined
Jan 5, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have 2 date drop downs in I2 and J2. They are lists that have the entire years dates in them. I am looking to sum values based on the dates listed in B. For example, If I choose date 1 to be 12/28 and date 2 to be 1/3, I would like it do to the same as =SUM(C2:C8)/SUM(F2:F8). I want to just be able to select the date ranges and have excel calculate it. Is this even possible? I've attached a screen shot.

Thank you.
 

Attachments

  • Screenshot 2021-01-04 232504.png
    Screenshot 2021-01-04 232504.png
    164.8 KB · Views: 28

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Stwerartc3

The simplest way I can think of is to convert your data in to a table, then use a slicer for the date filter (Main Ribbon, Insert, Slicer and select day). On the slicer you can pick the start date then find the end date and hold shift when selecting it. that will highlight all dates in between. The formula to calculate your outcome will come from the total row (a check box option in the table tools ribbon).

hope this helps
 

Attachments

  • Stewrartc3.PNG
    Stewrartc3.PNG
    51.5 KB · Views: 16
Upvote 0
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Maybe
Excel Formula:
=sumifs(C:C,B:B,">="&I2,B:B,"<="&J2)/sumifs(F:FC,B:B,">="&I2,B:B,"<="&J2)
 
Upvote 0
Thanks, I'm getting a #VALUE! with =SUMIFS(C:C,B:B,">="&I2,B:B,"<="&J2)/SUMIFS(F:FC,B:B,">="&I2,B:B,"<="&J2)
 
Upvote 0
Oops typo in the 2nd sumifs, it should be F:F not F:FC
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
Thanks @Fluff, I did think about SUMIFS, but could not get the date variations to work.
You're welcome & thanks for the feedback.
Cheers for the approach, I did think about SUMIFS, but was stuck dealing with dates; hence why I went with a slicer and table..
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,582
Members
449,039
Latest member
Arbind kumar

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