Out of curiosity.. <>

wakerider017

Board Regular
Joined
Jun 10, 2015
Messages
77
Out of curiosity, why does my formula with multiple does not equal signs "<>" not work while my formula with equal signs "=" does?

=IF(OR(I2="Closed Lost",I2="Closed Won",I2="Closed-RHB Declined",I2="Fall-Back",I2="On Hold"),"CLOSED","") Works

=IF(OR(I2<>"Closed Lost",I2<>"Closed Won",I2<>"Closed-RHB Declined",I2<>"Fall-Back",I2<>"On Hold"),"OPEN","") Does Not Work
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You need AND in the second condition not OR

Consider this:

There are three balls in a bag one Red, one Blue and one Green.

1) I want either a Red or Blue ball

IF(OR(Colour="Red",Colour="Blue"),"Yes","No")

2) In order to get the green ball I need to do the opposite

IF(AND(Colour<>"Red",Colour<>"Blue", "Yes","No")
 
Last edited:
Upvote 0
Think about it..

OR(I2<>"Closed Lost",I2<>"Closed Won",I2<>"Closed-RHB Declined",I2<>"Fall-Back",I2<>"On Hold")

Or requires only 1 of the arguments to be TRUE for the OR to return TRUE.

No matter what value is in I2 (excpt errors like #N/A), the OR will ALWAYS be TRUE
Say I2 = "Closed Lost", then <>"Closed Won" = TRUE, therefor the OR is TRUE
If I2 = "Fall-Back", then <>"Closed Lost" = TRUE, therefor the OR is TRUE

You would need to change OR to AND
 
Upvote 0
In your first formula, I2 must equal one of the texts in your OR function for it to be TRUE.

In your second formula, if I2 is not equal to more than one value, it will always be TRUE.
 
Upvote 0
Darn! Thanks guys! Makes perfect sense now.

As an aside, I've used this forum as reference for the past 2 years.. Just joined yesterday and glad to be a member! So much useful info here. Thank again!
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

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