Data Validation formula

Edgarvelez

Board Regular
Joined
Jun 6, 2019
Messages
197
Office Version
  1. 2016
Platform
  1. Windows
Hi All,
I am using data validation to protect cell D27 if cell D9 does not equal the word Metric Ton from it's drop-down and I have been able to accomplish by going to cell D27 and using Data Validation / Custom and the formula is =$D$9<>"Metric Ton" and I am able to protect cell D27

I would like to add to this formula the following =$D$10<>"GW" so that if D10 does not equal the word GW then it also protects D27
I am trying to protect the cell D27 if either or both conditions are met.
Attached is a jpg thanks in advanced.
 

Attachments

  • Data Validation.JPG
    Data Validation.JPG
    47.6 KB · Views: 8
In this case, try
=NOT(OR(EXACT(D9,"Metric Ton"),EXACT(D10,"GW"),EXACT(D12,"Single Bundle Weight")))
because you need TRUE for the edit to be permitted and FALSE to be rejected.

J.Ty.
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I just tried it and it is protecting only if all 3 are met.
 

Attachments

  • Data Validation.JPG
    Data Validation.JPG
    53.4 KB · Views: 3
Upvote 0
This should work:
=AND(NOT(EXACT(D9,"Metric Ton")),NOT(EXACT(D10,"GW")),NOT(EXACT(D12,"Single Bundle Weight")))

However, it is something extremely weird. This formula is exactly equivalent to the previous one, you can enter them in a spreadsheet in two adjacent cells and watch what values they produce for various values of D9, D10 and D12. They are always equal. However, if I put them in DV, they behave differently. Seems like a bug in Excel, unless there is something into it I do not know about.

J.Ty.
 
Upvote 0
thanks I will figure this out one way or another, I will let you know what I find out.

Thanks for your help
 
Upvote 0
OK, I more or less understand now. Open your data validation dialog and uncheck "Ignore blank" box.

It is a very strange one: it applies to the arguments of the formula, and not the field being protected. So when checked, it simpy permits whatever you enter there, if any of the argument fields (D9, D10 or D12) is blank.

Then either of my formulas should work as intended. But please check it carefully!

J.Ty.
 
Upvote 0
I tested it and it worked, You The Master.
Awesome and thank you sooooo much.
 
Upvote 0
Thanks for your kind words and good luck!

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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