Data validation with condition

Beneindias

Board Regular
Joined
Jun 21, 2022
Messages
97
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hello,

I'm trying to do something that i'm honestly not confident that can work as I imagine.

Lets assume that I have cell A1, where I can have "Sunday" or "Weekday"
In cell C1, tha data will depend on what is in cell A1,

So, if I have "Sunday" in cell A1, I want cell C1 to be empty, but if in A1, I have "Weekday", I want to input something.

I was trying to create a Data Validation condition, but it's not working properly, because it's only validating empty cell.

I tried with this validation:

Excel Formula:
=IF(OR($B8="Holiday";$B8="Saturday";$B8="Sunday");"")

Is it possible to do a data validation like I am trying?

Can any of you help me with this?

Thank you all
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
your formula does not match the words

data validation

A1 = "weekday"

But what if cell A1 has other text in - is it ONLY weekend that allows data to be entered

Not sure i fully understand
 
Upvote 0
by something do you mean any random value/text? or something that is in another list somewhere?
 
Upvote 0
Try this

Book1
BC
8Holiday
9Monday123
10Saturday
11
12
13
14
Sheet1
Cells with Data Validation
CellAllowCriteria
C8:C14Custom=($B8<>"Holiday")*($B8<>"Saturday")*($B8<>"Sunday")*($C8<>"")
 
Upvote 0
Solution
Ok, I will try to be more specific.

In cell A1, I can have:
- "Saturday";
- "Sunday";
- "Holiday";
- "Weekday".

if A1 = Weekday -> I can input text/value (actualy it will be time of departure)
if A1 = Sat, Sun or Holiday -> I can't input value/text (only validates empty cell)


Hope it's easier to understand this way.
I was trying to simplify.
 
Upvote 0
Try this

Book1
BC
8Holiday
9Monday123
10Saturday
11
12
13
14
Sheet1
Cells with Data Validation
CellAllowCriteria
C8:C14Custom=($B8<>"Holiday")*($B8<>"Saturday")*($B8<>"Sunday")*($C8<>"")
This worked.

Thanks for your help and to the others that tried to help, too.

Have a nice week
 
Upvote 0
what other text can be added - otherwise

=A1="weekday"
will only allow data entry to c1 if weekday is entered in a1
 
Upvote 0
@Phuoc great solution I've never seen custom data validation formulas.
 
Upvote 0
what other text can be added - otherwise

=A1="weekday"
will only allow data entry to c1 if weekday is entered in a1
Thanks for your sugestion, too.

Don't know how I didn't think of this
 
Upvote 0

Forum statistics

Threads
1,215,800
Messages
6,126,981
Members
449,351
Latest member
Sylvine

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