many ifs

mfd2112

Board Regular
Joined
Jan 2, 2010
Messages
86
I need a formula placed in cell M3 that will show as a letter “a” if cell C3 has the initials STA or CTA, and M3 would show as “c” if C3 has the initials GIL or STD, or show as “d” if C3 is DBL. If C3 is blank, M3 is also.
Any help is appreciated.
Dale
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi Dale,

How about...

=IF(C3="","",IF(OR(C3={"STA","CTA"}),"a",IF(OR(C3={"GIL","STD"}),"c",IF(C3="DBL","d"))))

or you could even use a lookup table...

=IF(C3="","",VLOOKUP(C3,LkupTbl,2,0))
 
Last edited:
Upvote 0
Hi mfd2112,

Try this in M3:

=IF(OR(LEFT(C3,3)="sta",LEFT(C3,3)="cta"),"A",IF(OR(LEFT(C3,3)="gil",LEFT(C3,3)="std"),"C",IF(LEFT(C3,3)="dbl","D",IF(C3="",""))))

Hope this will help you.....

Shweta
 
Upvote 0
Thanks you two, that was fast! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I like them all and mostly <o:p></o:p>
<o:p></o:p>
=IF(C3="","",IF(OR(C3={"STA","CTA"}),"a",IF(OR(C3={"GIL","STD"}),"c",IF(C3="DBL","d"))))<o:p></o:p>
<o:p></o:p>
<o:p></o:p>from Jeffery, thanks again.<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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