Two types of Data Validation in a cell?
=FIND(A1,UPPER("~YN"))1
your formula fail. If user enter both YN in a cell
Good catch. I didn't test for that possibility.
Try this one:
=(LEN(A1)=1)*(FIND(A1,UPPER("YN")))
--
Biff
Microsoft Excel MVP
"Teethless mama" wrote in message
...
Or, the robust version:
=FIND(A1,UPPER("~YN"))1
your formula fail. If user enter both YN in a cell
Try this one:
=AND(EXACT(A1,UPPER(A1)),OR(A1="Y",A1="N"))
"T. Valko" wrote:
Try this...
=FIND(A1,"~YN")1
Or, the robust version:
=FIND(A1,UPPER("~YN"))1
--
Biff
Microsoft Excel MVP
"Lakeville" wrote in message
...
I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list
with Y
&
N. And I understand how to enforce capitalization:
=EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.
.
|