Multiple formula trouble

cmisero

New Member
Joined
Jan 4, 2018
Messages
5
I'm sure this has been asked a million times so I apologize for the repetitiveness.

Having trouble entering multiple formulas in a cell

Example what I have so far:

In Cell A1

=IF(A2=7, "A")

That means if cell A2 value is 7 then it will put an A in cell A1.
Got that good so far.
How do I make multiple rules?
=IF(A2=8,"B")
=IF(A2=9,"C")

I think I have the formulas down, just can't for the life of me remember how to combine them into one formula for the selected cell.

Thanks in Advance!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Welcome to the Board!

If you want it all in one cell, you want to nest your IF statements, i.e.
Code:
=IF(A2=7,"A",IF(A2=8,"B",IF(A2=9,"C","")))
 
Upvote 0
Hi,

You can also use the LOOKUP function for your scenario:


Book1
ABCDEFG
1ABC#N/A#N/A 
278955
Sheet4
Cell Formulas
RangeFormula
A1=LOOKUP(A2,{7,8,9},{"A","B","C"})
F1=IFERROR(LOOKUP(F2,{7,8,9},{"A","B","C"}),"")


A1 formula copied across to E1, if you may have BLANK or values other than 7, 8, or 9 in row 2, then wrap the formula with IFERROR as shown in F1 (copied to G1 in sample).
 
Upvote 0

Forum statistics

Threads
1,215,659
Messages
6,126,074
Members
449,286
Latest member
Lantern

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