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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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