IF A= X, IF A=Y, If A<>X or Y, ???

jencha

New Member
Joined
Nov 10, 2017
Messages
20
Wondering how to format this...

=
IF(AS2="Y11Q4", "Established,
IF(AS2="Y12Q1", "New",
IF(OR(AS2<>"Y11Q4", AS2<>"Y12Q1"),
"Unestablished")

Basically, if AS2 doesn't equal Y11Q4 or Y12Q1, I would want to categorize this into a third Unestablished category...

Thanks, hope this isn't a silly question...
 

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
Since you are doing NOT equal, I think you actually want AND instead of OR, i.e.
Code:
[COLOR=#333333]=[/COLOR][COLOR=#333333]IF(AS2="Y11Q4", "Established",[/COLOR][COLOR=#333333]IF(AS2="Y12Q1", "New",[/COLOR][COLOR=#333333]IF(AND(AS2<>"Y11Q4", AS2<>"Y12Q1"), [/COLOR][COLOR=#333333]"Unestablished","")))[/COLOR]
 
Upvote 0
You don't need to test if AS2 does not equal Y11Q4 and Y12Q1.
If both the first 2 if's are not TRUE, then it can be assumed.

IF(AS2="Y11Q4", "Established",IF(AS2="Y12Q1", "New","Unestablished"))
 
Upvote 0
Try
Code:
=IF(AS2="Y11Q4","Established",IF(AS2="Y12Q1","New","unestablished"))

You do not need to test if AS2 is not equal to the values because the formula will not get to that calculation point if it was equal one of the values.
 
Upvote 0
jencha, good afternoon.

Try to use:

=IF(AS2="Y11Q4", "Established,
IF(AS2="Y12Q1", "New",
IF(AND(AS2<>"Y11Q4", AS2<>"Y12Q1"),"Unestablished")))

I hope it helps
 
Upvote 0
Good catch JonMo and Scott. It is totally unnecessary to check them, do to the previous two conditions.
Was working too fast and completely overlooked that!:oops:
 
Upvote 0
I have another question and I thank you in advance for taking a look. I want to say that If AY2:BB2 contain either New or Established (another way to think of it may be to exclude Unestablished), to state the value of G2. I've tried a variety of methods to no avail. You guys are really the best, I'm a brand new analyst on my second week of work :)
 
Upvote 0
Try. change the true and false values to what you want
Code:
=IF(OR(ISNUMBER(MATCH("New",AY2:BB2,0)),ISNUMBER(MATCH("Established",AY2:BB2,0))),"value if true","value if false")
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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