dealing with text - I need to set up an IF THEN situation

paulrus

New Member
Joined
Apr 14, 2002
Messages
15
I am a complete newbie to Excel, so I'm guessing this is a no brainer for most of you.

I have a column that has a series of state abbreviations. I want to set up a formula in another column that looks at the state abbreviations and basically says "IF E:E = AL, CT, DE, KY, etc. THEN H:H = whatever"

This seems like such a simple task, but I can't figure it out!

Help!

Thanks

Paul
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
On 2002-04-15 08:01, paulrus wrote:
I am a complete newbie to Excel, so I'm guessing this is a no brainer for most of you.

I have a column that has a series of state abbreviations. I want to set up a formula in another column that looks at the state abbreviations and basically says "IF E:E = AL, CT, DE, KY, etc. THEN H:H = whatever"

This seems like such a simple task, but I can't figure it out!

Help!

Thanks

Paul

In H1 enter and copy down:

=IF(OR(E1={"AL","CT","DE","KY"}),"Whatever","")
 
Upvote 0
THANK YOU!!!
Of course, I forgot 1/2 of my question.
the other half would be - if it does not = "Whatever" then it = "Something Else"

Does that make sense?

So if it is AL, CT, DE, KY, etc. it = "Whatever" but if it does not = "Whatever" it = "Something Else"....

Thanks again for the help on this beginner problem!
 
Upvote 0
Maybe a VLOOKUP?

Column A - state abbreviations
Column B - name of states
In C1 =VLOOKUP(C2,A1:B50,2)

Enter HI in C2 and C1 returns Hawaii!
Column A is sorted
 
Upvote 0
Already figured it out:

=IF(OR(E1={"AL","CT","DE","KY"}),"Whatever","Something Else")

Thanks!!!!
 
Upvote 0
On 2002-04-15 08:16, paulrus wrote:
THANK YOU!!!
Of course, I forgot 1/2 of my question.
the other half would be - if it does not = "Whatever" then it = "Something Else"

Does that make sense?

So if it is AL, CT, DE, KY, etc. it = "Whatever" but if it does not = "Whatever" it = "Something Else"....

Thanks again for the help on this beginner problem!

=IF(OR(E1={"AL","CT","DE","KY"}),"Whatever","")

Last "" is "Something else"; thusly:

=IF(OR(E1={"AL","CT","DE","KY"}),"Whatever","Something else")

Examine also what Brian is suggesting.
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,109
Members
448,548
Latest member
harryls

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