Multiple IF Criteria across multiple columns

Melo

New Member
Joined
Apr 1, 2013
Messages
7
Hi All,

Please forgive me if I do not explain myself clearly; I am rather new to Excel. I am trying to create a formula that will populate a cell with text depending on an entry in 7 other columns. Only one of the seven columns will have an "Yes" entry. This is what I have so far that is not working:
=IF(C:C="Yes","Injury",IF(D:D="Yes","Illness",IF(E:E="Yes","Property Damage",IF(F:F="Yes","Motor Vehicle",IF(G:G="Yes","First Aid",IF(H:H="Yes","Near Miss",IF(I:I="Yes","Other")))))))

So if there is a "yes" in column C, I want "Injury" to be displayed in my destination cell; if column C is blank but there is a "yes" in column E, then display "Property Damage" and so on. I am completely flummoxed. Any help would be greatly appreciated!!

Melo

 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
17,100
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
Hi and welcome to Mr Excel Forum

Assuming there are headers in row 1 like below

B C D E F G H I
Result
Injury
Illness
Property Damage
Motor Vehicle
First Aid
Near Miss
Other
First Aid
Yes
Injury
Yes
Yes
Property Damage
Yes
Other
Yes

<tbody>
</tbody>

Formula in B2
=IF(COUNTIF($C2:$I2,"Yes"),INDEX($C$1:$I$1,MATCH("Yes",$C2:$I2,0)),"")
copy down

M.
 
Upvote 0

Forum statistics

Threads
1,196,019
Messages
6,012,898
Members
441,738
Latest member
dataexcel

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