Total all in validation list

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
775
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi guys

I was wondering if there was a way (formula) to tally up all of the list in a validation list. I have provided a simple example of what I need

So from the below I have a list created from using data validation and when I choose the subject I need it sums it up as required. (=SUMIF($C$4:$C$9,$F$4,$D$4:$D$9))

Is there a way that I can sum all of the subjects with a formula if I put all in the list or would I need to edit the data to include an extra column and have "all" next to the entries and then throw in an IF statement



ListSubjectScoreListTotal
MathsMaths
65​
History
100​
EnglishEnglish
54​
HistoryHistory
32​
ChemistryMaths
76​
History
68​
Chemistry
65​


Would this be the best way (add a column with all and then using the below formula)

=IF(SUMIF($D$4:$D$9,$G$4,$E$4:$E$9)=0,SUMIF(C4:C9,G4,E4:E9),SUMIF($D$4:$D$9,$G$4,$E$4:$E$9))


ListCompleteSubjectScoreListTotal
MathsAllMaths
65​
All
360​
EnglishAllEnglish
54​
HistoryAllHistory
32​
ChemistryAllMaths
76​
AllAllHistory
68​
AllChemistry
65​

There shouldn't be a case where anything = 0 so this should only be the case when all is selected.

Using excel 365

Thanks as always
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
How about
Fluff.xlsm
ABCDEF
1ListSubjectScoreListTotal
2MathsMaths65All360
3EnglishEnglish54
4HistoryHistory32
5ChemistryMaths76
6AllHistory68
7Chemistry65
Sheet6
Cell Formulas
RangeFormula
F2F2=SUMIFS(C:C,B:B,IF(E2="All","*",E2))
Cells with Data Validation
CellAllowCriteria
E2List=$A$2:$A$6
 
Upvote 0
Solution
Thanks Fluff ! Does Exactly what I need, didn't know/to think you could put an IF statement in the criteria aspect.

(There is something so simplistic yet complex about what you provided)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

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