Sumif

AudyAnalyst

New Member
Joined
Nov 24, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hello!

I'm trying to Sum related categories into one simplified category, However, I keep getting zero. Can you look at my formula and tell me where I'm going wrong? Thank you!

For Example, "a. Asian or Pacific Islander" should sum "Asian - Bangladeshi (United Kingdom)", "Asian - Chinese (France)", "Asian - Indian (United Kingdom)", Etc. Each group mapped to one of the Simplified can be found on the key. The sum should be within each location, Washington "WA", Oklahoma "OK", etc.

Please let me know if I need to provide more information.

Sum if Help.xlsm
E
10
Key


Sum if Help.xlsm
H
20
DATA



Race/EthnicityGlobalWAOKFRANUK
White (United States of America)
133​
41​
92​
0​
0​
White - British (United Kingdom)
102​
0​
0​
0​
102​
White - Other (United Kingdom)
21​
0​
0​
0​
21​
Mixed - Other (United Kingdom)
1​
0​
0​
0​
1​
White - Other European (United Kingdom)
21​
0​
0​
0​
21​
Asian - Chinese (France)
2​
0​
0​
2​
0​
Asian (United States of America)
69​
17​
52​
0​
0​
Asian - Indian (United Kingdom)
5​
0​
0​
0​
5​
Asian - Other (France)
25​
0​
0​
25​
0​
Not Declaring (United Kingdom)
1​
0​
0​
0​
1​
Asian - Bangladeshi (United Kingdom)
5​
0​
0​
0​
5​
Asian - Other (United Kingdom)
3​
0​
0​
0​
3​
Two or More Races (United States of America)
21​
5​
16​
0​
0​
Mixed - White & Asian (United Kingdom)
13​
0​
0​
0​
13​
Mixed - White & Black Carribean (United Kingdom)
1​
0​
0​
0​
1​
White (France)
15​
0​
0​
15​
0​
I do not wish to answer. (United States of America)
19​
7​
12​
0​
0​
Mixed - White & Black African (United Kingdom)
2​
0​
0​
0​
2​
Asian - Pakistani (SP) (United Kingdom)
7​
0​
0​
0​
7​
Asian - Chinese (United Kingdom)
5​
0​
0​
0​
5​
Other (France)
10​
0​
0​
10​
0​
Native Hawaiian or Other Pacific Islander (United States of America)
3​
1​
2​
0​
0​
White - Irish (United Kingdom)
11​
0​
0​
0​
11​
Black or African American (United States of America)
20​
17​
3​
0​
0​
Middle Eastern or North African (United States of America)
6​
5​
1​
0​
0​


GlobalWAOKFRANUK
a. Asian or Pacific Islander
0​
=SUMIF(A2:A26,OR(Key!B2,Key!B3,Key!B4,Key!B5,Key!B6,Key!B7,Key!B8,Key!B9,Key!B10),DATA!C2:C26)​
b. Black/African
0​
c. Hispanic or Latino
0​
d. Middle Eastern or North African
0​
f. Two or more races
0​
e. White
0​
Perfer Not to Say
0​



SimplifiedRace/Ethnicity on Survey
a. Asian or Pacific IslanderAsian - Bangladeshi (United Kingdom)
Asian - Chinese (France)
Asian - Chinese (United Kingdom)
Asian - Indian (United Kingdom)
Asian - Other (France)
Asian - Other (United Kingdom)
Asian - Pakistani (SP) (United Kingdom)
Asian (United States of America)
Native Hawaiian or Other Pacific Islander (United States of America)
b. Black/AfricanBlack or African American (United States of America)
c. Hispanic or Latino
d. Middle Eastern or North AfricanMiddle Eastern or North African (United States of America)
f. Two or more racesMixed - Other (United Kingdom)
Mixed - White & Asian (United Kingdom)
Mixed - White & Black African (United Kingdom)
Mixed - White & Black Carribean (United Kingdom)
Other (France)
Two or More Races (United States of America)
e. WhiteWhite - British (United Kingdom)
White - Irish (United Kingdom)
White - Other (United Kingdom)
White - Other European (United Kingdom)
White (France)
White (United States of America)
Perfer Not to SayI do not wish to answer. (United States of America)
Not Declaring (United Kingdom)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Race/EthnicityGlobalWAOKFRANUK
White (United States of America)133419200
White - British (United Kingdom)102000102
White - Other (United Kingdom)2100021
Mixed - Other (United Kingdom)10001
White - Other European (United Kingdom)2100021
Asian - Chinese (France)20020
Asian (United States of America)69175200
Asian - Indian (United Kingdom)50005
Asian - Other (France)2500250
Not Declaring (United Kingdom)10001
Asian - Bangladeshi (United Kingdom)50005
Asian - Other (United Kingdom)30003
Two or More Races (United States of America)2151600
Mixed - White & Asian (United Kingdom)1300013
Mixed - White & Black Carribean (United Kingdom)10001
White (France)1500150
I do not wish to answer. (United States of America)1971200
Mixed - White & Black African (United Kingdom)20002
Asian - Pakistani (SP) (United Kingdom)70007
Asian - Chinese (United Kingdom)50005
Other (France)1000100
Native Hawaiian or Other Pacific Islander (United States of America)31200
White - Irish (United Kingdom)1100011
Black or African American (United States of America)2017300
Middle Eastern or North African (United States of America)65100


GlobalWAOKFRANUK
a. Asian or Pacific Islander00
b. Black/African0
c. Hispanic or Latino0
d. Middle Eastern or North African0
f. Two or more races0
e. White0
Perfer Not to Say0


SimplifiedRace/Ethnicity on Survey
a. Asian or Pacific IslanderAsian - Bangladeshi (United Kingdom)
Asian - Chinese (France)
Asian - Chinese (United Kingdom)
Asian - Indian (United Kingdom)
Asian - Other (France)
Asian - Other (United Kingdom)
Asian - Pakistani (SP) (United Kingdom)
Asian (United States of America)
Native Hawaiian or Other Pacific Islander (United States of America)
b. Black/AfricanBlack or African American (United States of America)
c. Hispanic or Latino
d. Middle Eastern or North AfricanMiddle Eastern or North African (United States of America)
f. Two or more racesMixed - Other (United Kingdom)
Mixed - White & Asian (United Kingdom)
Mixed - White & Black African (United Kingdom)
Mixed - White & Black Carribean (United Kingdom)
Other (France)
Two or More Races (United States of America)
e. WhiteWhite - British (United Kingdom)
White - Irish (United Kingdom)
White - Other (United Kingdom)
White - Other European (United Kingdom)
White (France)
White (United States of America)
Perfer Not to SayI do not wish to answer. (United States of America)
Not Declaring (United Kingdom)
 
Upvote 0
How about
Excel Formula:
=SUM(SUMIF(A2:A26,Key!B2:B10,C2:C26))
 
Upvote 0
Solution
Book1
ABCDEFGHIJKLMNOP
1Race/EthnicityGlobalWAOKFRANUKGlobalWAOKFRANUKSimplifiedRace/Ethnicity on Survey
2Asian - Bangladeshi (United Kingdom)50005a. Asian or Pacific Islander12418542725a. Asian or Pacific IslanderAsian - Bangladeshi (United Kingdom)
3Asian - Chinese (France)20020b. Black/African2017300Asian - Chinese (France)
4Asian - Chinese (United Kingdom)50005c. Hispanic or Latino00000Asian - Chinese (United Kingdom)
5Asian - Indian (United Kingdom)50005d. Middle Eastern or North African65100Asian - Indian (United Kingdom)
6Asian - Other (France)2500250f. Two or more races485161017Asian - Other (France)
7Asian - Other (United Kingdom)30003e. White303419215155Asian - Other (United Kingdom)
8Asian - Pakistani (SP) (United Kingdom)70007Perfer Not to Say2071201Asian - Pakistani (SP) (United Kingdom)
9Asian (United States of America)69175200Asian (United States of America)
10Black or African American (United States of America)2017300Native Hawaiian or Other Pacific Islander (United States of America)
11I do not wish to answer. (United States of America)1971200b. Black/AfricanBlack or African American (United States of America)
12Middle Eastern or North African (United States of America)65100c. Hispanic or Latino
13Mixed - Other (United Kingdom)10001d. Middle Eastern or North AfricanMiddle Eastern or North African (United States of America)
14Mixed - White & Asian (United Kingdom)1300013f. Two or more racesMixed - Other (United Kingdom)
15Mixed - White & Black African (United Kingdom)20002Mixed - White & Asian (United Kingdom)
16Mixed - White & Black Carribean (United Kingdom)10001Mixed - White & Black African (United Kingdom)
17Native Hawaiian or Other Pacific Islander (United States of America)31200Mixed - White & Black Carribean (United Kingdom)
18Not Declaring (United Kingdom)10001Other (France)
19Other (France)1000100Two or More Races (United States of America)
20Two or More Races (United States of America)2151600e. WhiteWhite - British (United Kingdom)
21White - British (United Kingdom)102000102White - Irish (United Kingdom)
22White - Irish (United Kingdom)1100011White - Other (United Kingdom)
23White - Other (United Kingdom)2100021White - Other European (United Kingdom)
24White - Other European (United Kingdom)2100021White (France)
25White (France)1500150White (United States of America)
26White (United States of America)133419200Perfer Not to SayI do not wish to answer. (United States of America)
27Not Declaring (United Kingdom)
Sheet1
Cell Formulas
RangeFormula
I2:M2I2=IFERROR(SUM(FILTER(B$2:B$26,("asian"=LEFT($A$2:$A$26,5)))),0)+IFERROR(SUM(FILTER(B$2:B$26,("nativ"=LEFT($A$2:$A$26,5)))),0)
I3:M3I3=IFERROR(SUM(FILTER(B$2:B$26,("black"=LEFT($A$2:$A$26,5)))),0)
I4:M4I4=IFERROR(SUM(FILTER(B$2:B$26,("hispa"=LEFT($A$2:$A$26,5)))),0)
I5:M5I5=IFERROR(SUM(FILTER(B$2:B$26,("middl"=LEFT($A$2:$A$26,5)))),0)
I6:M6I6=IFERROR(SUM(FILTER(B$2:B$26,("two o"=LEFT($A$2:$A$26,5)))),0)+IFERROR(SUM(FILTER(B$2:B$26,("Other"=LEFT($A$2:$A$26,5)))),0)+IFERROR(SUM(FILTER(B$2:B$26,("Mixed"=LEFT($A$2:$A$26,5)))),0)
I7:M7I7=IFERROR(SUM(FILTER(B$2:B$26,("white"=LEFT($A$2:$A$26,5)))),0)
I8:M8I8=SUM(FILTER(B$2:B$26,("I do "=LEFT($A$2:$A$26,5))))+SUM(FILTER(B$2:B$26,("not d"=LEFT($A$2:$A$26,5))))
 
Upvote 0
another solution, if you are able to add letters to the front of each category in the list
-------------------
Book1
ABCDEFGHIJKLMNOP
1Race/EthnicityGlobalWAOKFRANUKGlobalWAOKFRANUKSimplifiedRace/Ethnicity on Survey
2a. Asian - Bangladeshi (United Kingdom)50005a. Asian or Pacific Islander12418542725a. Asian or Pacific IslanderAsian - Bangladeshi (United Kingdom)
3a. Asian - Chinese (France)20020b. Black/African2017300Asian - Chinese (France)
4a. Asian - Chinese (United Kingdom)50005c. Hispanic or Latino00000Asian - Chinese (United Kingdom)
5a. Asian - Indian (United Kingdom)50005d. Middle Eastern or North African65100Asian - Indian (United Kingdom)
6a. Asian - Other (France)2500250f. Two or more races485161017Asian - Other (France)
7a. Asian - Other (United Kingdom)30003e. White303419215155Asian - Other (United Kingdom)
8a. Asian - Pakistani (SP) (United Kingdom)70007z. Perfer Not to Say2071201Asian - Pakistani (SP) (United Kingdom)
9a. Asian (United States of America)69175200Asian (United States of America)
10a. Native Hawaiian or Other Pacific Islander (United States of America)31200Native Hawaiian or Other Pacific Islander (United States of America)
11b. Black or African American (United States of America)2017300b. Black/AfricanBlack or African American (United States of America)
12d. Middle Eastern or North African (United States of America)65100c. Hispanic or Latino
13e. White - British (United Kingdom)102000102d. Middle Eastern or North AfricanMiddle Eastern or North African (United States of America)
14e. White - Irish (United Kingdom)1100011f. Two or more racesMixed - Other (United Kingdom)
15e. White - Other (United Kingdom)2100021Mixed - White & Asian (United Kingdom)
16e. White - Other European (United Kingdom)2100021Mixed - White & Black African (United Kingdom)
17e. White (France)1500150Mixed - White & Black Carribean (United Kingdom)
18e. White (United States of America)133419200Other (France)
19f. Mixed - Other (United Kingdom)10001Two or More Races (United States of America)
20f. Mixed - White & Asian (United Kingdom)1300013e. WhiteWhite - British (United Kingdom)
21f. Mixed - White & Black African (United Kingdom)20002White - Irish (United Kingdom)
22f. Mixed - White & Black Carribean (United Kingdom)10001White - Other (United Kingdom)
23f. Other (France)1000100White - Other European (United Kingdom)
24f. Two or More Races (United States of America)2151600White (France)
25z. I do not wish to answer. (United States of America)1971200White (United States of America)
26z. Not Declaring (United Kingdom)10001Perfer Not to SayI do not wish to answer. (United States of America)
27Not Declaring (United Kingdom)
Sheet1 (2)
Cell Formulas
RangeFormula
I2:M8I2=IFERROR(SUM(FILTER(B$2:B$26,LEFT($H2,1)=LEFT($A$2:$A$26,1))),0)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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