Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default How do you restrict a cell to accepting only "Y" or "N" ?

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
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: How do you restrict a cell to accepting only "Y" or "N" ?

To restrict a cell to accepting only "Y" or "N", you can use data validation in Excel. Here are the steps:
  1. Select the cell or range of cells that you want to restrict to "Y" or "N".
  2. Go to the Data tab in the ribbon and click on Data Validation.
  3. In the Data Validation dialog box, under the Settings tab, choose "List" from the Allow drop-down menu.
  4. In the Source field, type
    Code:
    "Y,N"
    (without the quotes) or select the cells that contain "Y" and "N" values.
  5. Optionally, you can add an Input Message and/or an Error Alert to inform the user about the restriction and what to do if they enter an invalid value.
  6. Click OK to apply the data validation.

Now, the selected cell or range of cells will only accept "Y" or "N" values. If the user tries to enter any other value, they will see an error message (if you added an Error Alert) and the value will not be accepted.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 364
Default How do you restrict a cell to accepting only "Y" or "N" ?

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

"NickR2" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 353
Default How do you restrict a cell to accepting only "Y" or "N" ?

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.

"NickR2" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 03:18 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 11:01 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"