Data validation for showing error

avishek49ag

New Member
Joined
Jun 25, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
In F5 ,I have a List. if any one select this values "Book1","Book2" and "Book3".. i have to show some error using data validation

"=OR((F5<>"Book1"),(F5<>"Book2"),(F5<>"Book3"))"

why this code is not working??
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
If you want to exclude all 3 options, I think you need to change the "OR" to "AND".
Otherwise, it will allow everything.

You would use "OR" is you were limiting to the the things it CAN be, not the ones it CANNOT be.
 
Upvote 0
Solution
If you want to exclude all 3 options, I think you need to change the "OR" to "AND".
Otherwise, it will allow everything.

You would use "OR" is you were limiting to the the things it CAN be, not the ones it CANNOT be.
Thank you so much !!! now it is working
 
Upvote 0
You are welcome.

If you think about it, it makes sense.
If you had "Book1", the first check would be FALSE but the other two would be TRUE.
In an OR statement, only one needs to be TRUE for the whole thing to be TRUE.
In an AND statement, all need to be TRUE for the whole thing to be TRUE.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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