Multiple columns not mutually exclusive, possible messy nested if?

mpndei

New Member
Joined
Feb 11, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all-- qualitative researcher trying to do quantitative work and could use some help here!

I have a spreadsheet where I have 6 columns (N-S) that have binary yes "Y"/no "N" for individual race categories. They may also be blank if the person did not input their race information, which would count as unknown, but needs to remain blank. I need to create a formula in the 7th column (V) that looks across N-S, see what race the person is, then input the letter code for that race. My gut reaction was to do a nested IF, but I also have instances where a person may have multiple yeses (multiracial) so they have another code (S in column V). I have racked my brain and I'm at a loss. I understand that IF will look for only true/false scenarios, and I don't think an if-else is what I'm looking for, but I'm unsure of a way to do one without having to write out every possible combination (they could in theory have yes across all six). The spreadsheet is 30,000 cases, so I can't do this manually.

Picture is a past version of what needs to be accomplished, but there's no code included to figure it out.

So for example, row ending in 76, the case only has Y for White, so V76 is W. Row 81 has all nos, so V81 is U for unknown. Row 82 is both American Indian and White, so they get S in V82 (for multiracial).

Screen Shot 2021-02-11 at 3.09.00 PM.png
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
4,567
Office Version
  1. 365
Platform
  1. MacOS
so you have 4 codes
B, W, S, U

so some thing like
IF (COUNTIF(N2;S2,"Y") > 1 , "S",
IF (COUNTIF(N2;S2,"Y") = 0 , "U",
that then leaves W or B
How is that worked OUT , maybe a count can work there

In summary
What are the combinations of the Y and the output
we know S is more than 1 Y
we know U is 0 Y

W = ?
B = ?
 

Watch MrExcel Video

Forum statistics

Threads
1,126,957
Messages
5,621,823
Members
415,859
Latest member
Vain

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
Top