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: 4

Some videos you may like

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

dnorm

Board Regular
Joined
Dec 28, 2017
Messages
96
Office Version
  1. 365
Platform
  1. Windows
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: 0

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows
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)
 

stewartc3

New Member
Joined
Jan 5, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
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)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Oops typo in the 2nd sumifs, it should be F:F not F:FC
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

dnorm

Board Regular
Joined
Dec 28, 2017
Messages
96
Office Version
  1. 365
Platform
  1. Windows
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..
 

Watch MrExcel Video

Forum statistics

Threads
1,127,423
Messages
5,624,707
Members
416,043
Latest member
Milan05

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
Top