ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Validation problem. (https://www.excelbanter.com/excel-worksheet-functions/170282-validation-problem.html)

Petter

Validation problem.
 
Lets make this very simple. I have two cells. Lets call them A1 and B1. I
want the cells to be blank or contain just "X". Anything else should not be
allowed. This i can solve by making a validation rule.I have solved this just
by makeing a list that just contain "x", so you get a dropdown box with just
x in it.

But both cells cant contain "X". This can i allsow solve by makeing a
validation rule.
Here i just added =A1="" in the validation. And offcourse i can add =B1=""
in the other valiation cell.

The problem is that i cant solve both. Need help with this one. Plz.

I dont want to use buttons..cuz this will apply to over 1000 cells.

Stephen[_2_]

Validation problem.
 
Select A1 and B1. Apply this formula in Data Validation:
=(COUNTIF($A$1:$B$1,"="&"X")<2)

"Petter" wrote in message
...
Lets make this very simple. I have two cells. Lets call them A1 and B1. I
want the cells to be blank or contain just "X". Anything else should not
be
allowed. This i can solve by making a validation rule.I have solved this
just
by makeing a list that just contain "x", so you get a dropdown box with
just
x in it.

But both cells cant contain "X". This can i allsow solve by makeing a
validation rule.
Here i just added =A1="" in the validation. And offcourse i can add
=B1=""
in the other valiation cell.

The problem is that i cant solve both. Need help with this one. Plz.

I dont want to use buttons..cuz this will apply to over 1000 cells.




Petter

Validation problem.
 
Thx, but this not solve the problem with the first issue. The user can still
put anything want they into the cell. This should only be restricted to
either blank " " or "x".

"Stephen" wrote:

Select A1 and B1. Apply this formula in Data Validation:
=(COUNTIF($A$1:$B$1,"="&"X")<2)

"Petter" wrote in message
...
Lets make this very simple. I have two cells. Lets call them A1 and B1. I
want the cells to be blank or contain just "X". Anything else should not
be
allowed. This i can solve by making a validation rule.I have solved this
just
by makeing a list that just contain "x", so you get a dropdown box with
just
x in it.

But both cells cant contain "X". This can i allsow solve by makeing a
validation rule.
Here i just added =A1="" in the validation. And offcourse i can add
=B1=""
in the other valiation cell.

The problem is that i cant solve both. Need help with this one. Plz.

I dont want to use buttons..cuz this will apply to over 1000 cells.





Stephen[_2_]

Validation problem.
 
My apologies. Try this formula instead:
=AND(OR(A1="",A1="X"),(COUNTIF($A$1:$B$1,"="&"X")< 2))
(The first two cell references are meant to be relative.)

"Petter" wrote in message
...
Thx, but this not solve the problem with the first issue. The user can
still
put anything want they into the cell. This should only be restricted to
either blank " " or "x".

"Stephen" wrote:

Select A1 and B1. Apply this formula in Data Validation:
=(COUNTIF($A$1:$B$1,"="&"X")<2)

"Petter" wrote in message
...
Lets make this very simple. I have two cells. Lets call them A1 and B1.
I
want the cells to be blank or contain just "X". Anything else should
not
be
allowed. This i can solve by making a validation rule.I have solved
this
just
by makeing a list that just contain "x", so you get a dropdown box with
just
x in it.

But both cells cant contain "X". This can i allsow solve by makeing a
validation rule.
Here i just added =A1="" in the validation. And offcourse i can add
=B1=""
in the other valiation cell.

The problem is that i cant solve both. Need help with this one. Plz.

I dont want to use buttons..cuz this will apply to over 1000 cells.








All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com