The If function in Numbers
The If function in Numbers only allows 3 nested items. What function can I use to select a response from a set of 5 responses, as follows: Normal, Mild, Moderate, Severe, Extremely Severe?
MacBook Pro with Touch Bar
The If function in Numbers only allows 3 nested items. What function can I use to select a response from a set of 5 responses, as follows: Normal, Mild, Moderate, Severe, Extremely Severe?
MacBook Pro with Touch Bar
Hi Cracker60,
What you want is a lookup table. I use INDEX/MATCH instead of VLOOKUP or HLOOKUP becasue it is more powerful and actually easier to use.
So I have a popup menu in A2 with the 5 situations as choices.
B2=INDEX(lookup::B,MATCH(A2,lookup::A,0),column-index,area-index)
The formual looks for a match of A2 in the lookup table column A. If it finds an exact match it returns the vallue in column B.
quinn
Hi Cracker60,
What you want is a lookup table. I use INDEX/MATCH instead of VLOOKUP or HLOOKUP becasue it is more powerful and actually easier to use.
So I have a popup menu in A2 with the 5 situations as choices.
B2=INDEX(lookup::B,MATCH(A2,lookup::A,0),column-index,area-index)
The formual looks for a match of A2 in the lookup table column A. If it finds an exact match it returns the vallue in column B.
quinn
More than 3 IF statements can be nested:
B2: IF(A2="Normal","OK",IF(A2="Mild","Use caution",IF(A2="Moderate","Keep calm and carry on",IF(A2="Severe","Batten down the hatches","Panic!!!"))))
But beyond three conditions the formula gets ugly and difficult to troubleshoot and maintain. Moving to a Lookup table is a better choice.
The table can be external, as described in quinn's post above, or can be written into the formula:
B2: INDEX("OK","Use caution","Keep Calm…","Batten down the hatches!","Panic!!!"),MATCH("Normal","Mild","Moderate","Severe","Extremely severe",0)
Regards,
Barry
The If function in Numbers