Actuarial Outpost (http://www.actuarialoutpost.com/actuarial_discussion_forum/index.php)
-   Software & Technology (http://www.actuarialoutpost.com/actuarial_discussion_forum/forumdisplay.php?f=17)
-   -   dumb excel question (http://www.actuarialoutpost.com/actuarial_discussion_forum/showthread.php?t=328709)

 llcooljabe 12-13-2017 12:44 PM

dumb excel question

Is there an alternative to a nested if? I don't want to create a table on which to use index/match or a lookup function.

e.g.
if(cell= text1,result A, if (cell = text2, result B, result C))

I could create a table like below and use a lookup function or index/match, but i don't want to for a one time formula with 3-5 options.
Text1 ResultA
Text2 ResultB
Text3 ResultC

 Kenny 12-13-2017 12:54 PM

IFS?

 llcooljabe 12-13-2017 12:57 PM

only available in office 365.

 SlowMotionWalter 12-13-2017 01:01 PM

You nest those IFs and be happy you can now do more than 7.

 ALivelySedative 12-13-2017 01:04 PM

Quote:
 Originally Posted by SlowMotionWalter (Post 9189272) You nest those IFs and be happy you can now do more than 7.
:lol:

 Meshuga 12-13-2017 01:41 PM

perhaps the choose function?

 Childish Gambino 12-13-2017 01:49 PM

if(a2&b2&...&x2 = result1&result2&...&resultn,foo,bar)

?

 MoralHazard 12-13-2017 01:55 PM

=IF(A1="Text1", "ResultA", "")&IF(A1="Text2", "ResultB", "")&IF(A1="Text3", "ResultC", "")

 MoralHazard 12-13-2017 01:58 PM

=CHOOSE(MATCH(A1, {"Text1","Text2","Text3"}, 0), "ResultA", "ResultB", "ResultC")

 Dr T Non-Fan 12-13-2017 03:28 PM

Meh. VLOOKUP. I do this all the time.