Thanks:  0
Likes:  0

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

1. 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

2. 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","")

3. 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!

4. 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

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

Thanks!!!!

6. 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.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•