Out of curiosity.. <>

wakerider017

Board Regular
Joined
Jun 10, 2015
Messages
74
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
 

Some videos you may like

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.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,350
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:

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
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
 

bbott

Well-known Member
Joined
Feb 5, 2010
Messages
2,350
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.
 

wakerider017

Board Regular
Joined
Jun 10, 2015
Messages
74
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!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,331
Members
414,446
Latest member
CRAVIN

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
Top