Data validation using adjacent cell and checking for letter "x"

DavidCtx

New Member
Joined
Sep 25, 2017
Messages
4
Hello,

I am trying to use data validation to check the adjacent cell for blank and the current cell must contain only the letter "x". No quotes.

I have tried many variations after searching and when I use this in another cell as a true false for testing purposes is comes back as true when D15 is blank and I type X into C15. However when I use it in custom data validation formula it will not accept it.

The cell I am configuring for DV is C15.
Formula AND(C15="x",D15="")

Thank you.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Upvote 0
Thank you for your reply. I am trying to avoid using a drop down list and ensure a user only enters an X in the cell or they may leave the cell blank.

I hope this helps.
 
Upvote 0
Hello,

I am trying to use data validation to check the adjacent cell for blank and the current cell must contain only the letter "x". No quotes.

I have tried many variations after searching and when I use this in another cell as a true false for testing purposes is comes back as true when D15 is blank and I type X into C15. However when I use it in custom data validation formula it will not accept it.

The cell I am configuring for DV is C15.
Formula AND(C15="x",D15="")

Thank you.


I have 2 columns in my worksheet. A user may enter an X in column C or column D but not both.
Then I am checking to see if the adjacent column is blank and that the user in inputting an X only if it is.

Thanks
 
Upvote 0
Ahhh, ok, I think I see. I don't think you can do this in a single step. If the only values that can be entered in C and D are either nothing or x, then you need to add data validation to each column where x is the only option. They user won't have to use the dropdown although it will be there. If you don't want the dropdown at all, you can skip the data validation but its more likely they'll make an error so you'll need better instructions. Next, you'll need another column that checks to see that they've entered the x in only one column with something like this =IF(OR(C2&D2="",C2&D2="x"),0,1). This function looks at the concatenation of C and D and returns a 0 if it is null or x; otherwise, it returns a 1. Since 1 represents all the situations that you don't want, you'll have to decide how to flag the user to this. Perhaps some conditional formatting on C and D. If you really want to force the user to enter an x in only one columns, and not just notify them, then that will take some VBA. Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,216,523
Messages
6,131,151
Members
449,626
Latest member
Stormythebandit

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