Limit an Excel cell to one of two possible values

29

3

I would like to create a cell format for one cell to only allow the value "yes" or "no" for this cell.

How could I do this?

Josemalive

Posted 2010-04-13T12:39:12.260

Reputation:

Answers

39

Microsoft describes this here: Apply data validation to cells

  1. Click the cell you want to restrict value for
  2. Go to Data -> Validation. The Data Validation dialog box opens
  3. In the Allow dropdown select List
  4. In the Source text box enter Yes,No

    Note: This will also work for more than two possible options; simply separate additional desired options with a comma.

Now your cell will have a dropdown with Yes and No. The user can also type these values without clicking the dropdown button.

enter image description here

enter image description here

dcp

Posted 2010-04-13T12:39:12.260

Reputation: 591

2I think that you have a typo for the Source text value. It should be Yes;no - semicolon. With a comma at least with Excel 2016 I get Yes,No as a value. – Daniel Dimitrov – 2016-06-16T17:22:12.043

1@Daniel Dimitrov - The comma works fine with Excel 2010, which is what I'm running, so it is not a typo. I cannot speak for Excel 2016 since that software didn't exist at the time this answer was written many years ago :). And semicolon does not work in Excel 2010, only comma works. – dcp – 2016-06-16T18:42:13.590

@PeterLang the link is dead – Simon – 2016-11-22T09:16:45.257

@Simon: Thanks, I removed my comment with the wrong link and added a working link to my answer. – Peter Lang – 2016-11-22T10:36:54.130