different calculation based on dropdown list

skykaiz

New Member
Joined
Sep 19, 2019
Messages
3
Hello guys,

I have got a questions regarding different calculations based on the selection of the drop-down list. In other words, how can I have different calculations based on what variable I select in the drop-down-list?


For example, let's say I've got 5 companies and I created a drop-down list where I can select one company.

Company A
Company B
Company C
Company D
Company E

<tbody>
</tbody>

Then I got the data like sales per week and a variable total sales:

Sales per weekMonTueWedThuFri
Company A2112311221
Company B2426212611
Company C1215121712
Company D1211312721
Company E2122261512

<tbody>
</tbody>

Total sales

<tbody>
</tbody>

Now I would like to calculate total sales, which is Sum(Mon:Fri), but based on what Company I select in the drop down list e.g. if I select Company A, it should calculate Sum(21:21), if I select Company B then Sum(24:11) and so on.


How can I make it happen in excel?

Thanks a lot!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Maybe something like


Book1
ABCDEFGHIJ
1Sales per weekMonTueWedThuFri
2Company A2112311221Company A
3Company B242621261197
4Company C1215121712
5Company D1211312721
6Company E2122261512
Report
Cell Formulas
RangeFormula
J3=SUM(INDEX(B2:F6,MATCH(J2,A2:A6,0),0))
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

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