Nested Excel Function

chegra26

Board Regular
Joined
Jun 7, 2014
Messages
90
I have the 6 columns that I need to include in an IF formula that I am having issues with.
Column A is Ethnicity,Values are "Y" for Yes and "N" for No
Column B is America Indian, Values are "0" mean not American Indian and "1" meaning person is America Indian
Column C is Asia, Values are "0" means not Asian and "2" meaning Asian
Column D is Africa American, Vales are "0" meaning not Africa American and "3" meaning person is African America
Column E is Native Hawaiian, Values are "0" meaning not Native Hawaiian and "4" meaning person is Native Hawaiian
Column F is White, Values are "0"meaning not White and "5" meaning person is white
Column G is my formula in which I need my results to be either: "Hispanic" based on the Y value in Column A or American Indian if Column B ="1" or Asian if Column C ="2" or African American if Column D ="3" or Native Hawaiian if Column E="4" or White if Column F ="5" or Two or More if there is a combination of columns B-G that <> "0".
Column A Trumps any of the results.
I have the following formula which works except for the result of Two or More should the person have more than one race.

=IF(A2="Y","Hispanic",IF(B2="1","American Indian",IF(C2="2","Asian",IF(D2="3","African American",IF(E2="4","Native Hawaiian",IF(F2="5","White","Two r More")))))

Please help
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

Based on your description, this should do what you need:


Book1
ABCDEFG
1EthnicityAmerican IndianAsianAfrican CamericanNative HawaiianWhiteResult
2N12345Two or More
3N00300African Camerican
4N00000
5Y00005Hispanic
60
7N00005White
Sheet236
Cell Formulas
RangeFormula
G2=IFERROR(IF(A2="Y","Hispanic",IF(COUNTIF(B2:F2,">0")>1,"Two or More",CHOOSE(SUM(B2:F2),B$1,C$1,D$1,E$1,F$1))),"")


Formula copied down.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

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