How do you restrict a cell to accepting only "Y" or "N" ?

N

NickR2

We need to format a cell so that it will only accept a "Y" for yes, or a "N"
for no.
How can this be done?

Thank you
 
S

Stephen

Select the cell (say,A1):
Data > Validation
Allow:
select Custom
Formula:
=(OR(A1="Y",A1="N"))
 
B

BoniM

Select the cell or range of cells and choose Validation from the Data menu.
Change Allow to List and in the source box, type: Y, N
This will allow the entry of a captial y or a captial n only in this cell or
range.
You can also click the input message tab and add a message that will appear
when a user enters the cell, telling them the restrictions or enter an error
message that the user receives when they enter incorrect data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top