Sum based on data validation cell

davidrendle999

New Member
Joined
Sep 7, 2021
Messages
4
Office Version
  1. 365
Platform
  1. MacOS
Hi All,
I haven't been able to find a similar query to this that has been answered, apologies if that's the case. I am looking for a way to display a difference between two cells based on a drop down data validation selection. I hope I can explain this properly.

Essentially I have two tables of information. Like this:
Table 1
A12
B34
C52
D11
E43
F23

Table 2
A200
B200
C300
D200
E300
F300

What I would like to achieve is a cell that will display the answer of the 'Table 2's A score e.g 200 minus 'Table 1's A Score e.g 12 based on a cell next to it with a drop down list of A,B,C,D,E,F. So if I selected F I would get '300-23' or E '300-43' etc.

I hope I have explained adequately what I mean here, thank you so much in advance for any support.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
something like a sumif()-sumif()
OR maybe a lookup

What cell is the dropdown in -

Lets assume a different table 3

=SUMIF(Table2 criteria range , dropdown value, sumrange ) - SUMIF(Table1 criteria range , dropdown value, sumrange )

Book1
ABCDEFGH
1Table 1Table 2DropdownA
2A12A200
3B34B200Total188
4C52C300
5D11D200
6E43E300
7F23F300
Sheet2
Cell Formulas
RangeFormula
H3H3=SUMIF(D2:D7,H1,E2:E7)-SUMIF(A2:A7,H1,B2:B7)
 
Upvote 0
Thank you for the response!

I'm sorry, I'm not quite sure I follow.

The drop down list will be in Cell A1. Cell A2 would be the cell to show the results of table 2 - table 1 based on Call A1 being A,B,C,D,E or F. I hope that clarifies.

Thank you!
 
Upvote 0
where are the tables ?

Book1
ABCDE
1A
2188
3
4Table 1Table 2
5A12A200
6B34B200
7C52C300
8D11D200
9E43E300
10F23F300
Sheet2
Cell Formulas
RangeFormula
A2A2=SUMIF(D5:D10,A1,E5:E10)-SUMIF(A5:A10,A1,B5:B10)
 
Upvote 0
ok,
here is the excel again given your info, although the formula is the same

Book1
ABCDEFGH
1ATable 1Table 2
2188A12A200
3B34B200
4C52C300
5D11D200
6E43E300
7F23F300
8
9Table 1 is D1:E7 and Table 2 G1:H7
Sheet2
Cell Formulas
RangeFormula
A2A2=SUMIF(G2:G7,A1,H2:H7)-SUMIF(D2:D7,A1,E2:E7)


added a lookup version
]
Book1
ABCDEFGH
1ATable 1Table 2
2188using SUMA12A200
3B34B200
4C52C300
5188using lookupD11D200
6E43E300
7F23F300
8
9Table 1 is D1:E7 and Table 2 G1:H7
Sheet2
Cell Formulas
RangeFormula
A2A2=SUMIF(G2:G7,A1,H2:H7)-SUMIF(D2:D7,A1,E2:E7)
A5A5=INDEX(H2:H7,MATCH(A1,D2:D7,0))-INDEX(E2:E7,MATCH(A1,D2:D7,0))
 
Last edited:
Upvote 0
Solution
you are welcome, added a lookup version to my last post
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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