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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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