Multiple =IF

Dom2012

Board Regular
Joined
Oct 2, 2006
Messages
77
Hi,

I've been trying to figure this out to no avail.

I want a cell to return one of seven values contingent upon another cell having one of another seven values. Example:-

If A1 = A then B1 should = HORSE
If A1 = B then B1 should = GOAT
If A1 = C then B1 should = DOG
If A1 = D then B1 should = CAT
If A1 = E then B1 should = MOUSE
If A1 = F then B1 should = DUCK
If A1 = G then B1 should = BEETLE

What formula would I put in cell B1 to get this result?

Many thanks,
Dom
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi,

I've been trying to figure this out to no avail.

I want a cell to return one of seven values contingent upon another cell having one of another seven values. Example:-

If A1 = A then B1 should = HORSE
If A1 = B then B1 should = GOAT
If A1 = C then B1 should = DOG
If A1 = D then B1 should = CAT
If A1 = E then B1 should = MOUSE
If A1 = F then B1 should = DUCK
If A1 = G then B1 should = BEETLE

What formula would I put in cell B1 to get this result?

Many thanks,
Dom
See this...

http://contextures.com/xlFunctions02.html
 
Upvote 0
Hi,

I've been trying to figure this out to no avail.

I want a cell to return one of seven values contingent upon another cell having one of another seven values. Example:-

If A1 = A then B1 should = HORSE
If A1 = B then B1 should = GOAT
If A1 = C then B1 should = DOG
If A1 = D then B1 should = CAT
If A1 = E then B1 should = MOUSE
If A1 = F then B1 should = DUCK
If A1 = G then B1 should = BEETLE

What formula would I put in cell B1 to get this result?

Many thanks,
Dom
Try...

=INDEX({"HORSE","GOAT","DOG","CAT","MOUSE","DUCK","BEETLE"},MATCH(A1,{"A","B","C","D","E","F","G"},0))

Or

=INDEX(AnimalRange,MATCH(A1,LetterRange,0))

where AnimalRange stands for a range housing animals and LetterRange the corresponding letters.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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