A Yes or No drop-down in Excel is a one-cell control whose Source field holds the two literal words Yes and No so Data Validation only accepts those two answers — and when each cell behind that control needs to be a fresh, random pick rather than a static choice, the Yes or No Generator produces that value in your browser using Crypto.getRandomValues, never uploads the question or answer, and stores up to 20 of the latest results in a newest-first history for review. The static side is built entirely inside Excel with Data > Data Validation > Allow: List, Source: Yes,No; the random side is handled outside the sheet by typing an optional question of up to 1,000 UTF-16 code units into the tool, pressing Generate Yes or No, then copying the displayed answer into a target cell. Because 2 divides 2^32 exactly, every valid 32-bit source integer is accepted without rejection, and even values map to Yes while odd values map to No, so each side of the binary outcome receives exactly 2^31 source integers. That is the cleanest bridge between a deterministic Excel drop-down list and a browser-side random source the spreadsheet itself cannot produce on demand.

What a Yes or No Drop-Down in Excel Actually Contains
Inside Excel, a Yes or No drop-down is a Data Validation rule bound to one or more cells. The drop-down contents live in the Source field of the validation dialog, not inside the cell value. You open Data > Data Validation, pick Allow: List, and supply either two comma-separated strings (Yes,No) or a named range that resolves to those two strings. Once saved, the cell shows a small arrow, and typing anything outside the list raises a validation error. This is a purely client-side constraint inside the spreadsheet; it does not randomize, weight, or shuffle anything.
Excel also offers three formula-based ways to generate a Yes or No inside a cell: a RANDBETWEEN call wrapped in CHOOSE, a nested IF on RAND(), or a custom function. Those formulas recalculate on every workbook change and produce a different answer at unpredictable times, which is rarely what a controlled drop-down workflow needs. A static drop-down plus an external random source is usually a more predictable pattern: the cell holds whatever you last copied into it, the drop-down enforces a clean visual choice, and the randomness comes from a tool that does not depend on spreadsheet recalculation events.
Why Pair the Excel Drop-Down With a Random Source
Excel's built-in drop-down is deterministic. Users choose from Yes or No; nothing picks for them. If you want a random outcome per cell — for an audit sample, a quick demo, a coin-flip log, or a teaching example — you need a separate generator. A browser-based Yes or No Generator is a natural fit because it runs in the same tab as your online workbook reference, never uploads the question or result, and gives one answer per click that you can copy in a single step. Each click consumes a fresh 32-bit integer from Crypto.getRandomValues; the next click is independent of the previous one, and the tool explicitly does not fall back to Math.random if Web Crypto is missing — it fails visibly instead.
Compare that to a spreadsheet formula that re-evaluates on any cell edit: the answer is not stable, the value cannot be re-inspected reliably, and the underlying randomness comes from a Math.random implementation whose source is undocumented and varies by platform. For casual workflows, the browser generator keeps the answer locked until you click again, surfaces the source method in plain language, and keeps a transparent record of what was produced without leaving the device.
Creating a Yes or No Drop-Down in Excel With Random Values
- In Excel, select the cells that should show a drop-down, then on the Data tab click Data Validation. In the Allow list pick List, and in the Source box type Yes,No (or use a named range that resolves to those two strings).
- Click OK to confirm. Each selected cell now shows a small arrow and rejects any text that is not in the source list.
- Open the Yes or No Generator in a new browser tab next to your spreadsheet.
- Optionally type a low-stakes question of at most 1,000 UTF-16 code units in the question field. Empty text is valid because the question is optional; trimming decides only whether the history labels the entry No question.
- Click Generate Yes or No and read the prominently displayed current answer. Each click consumes one Uint32 from Web Crypto and maps even values to Yes, odd values to No.
- Copy the displayed Yes or No into the matching Excel cell. The cell now holds a value the drop-down will accept and never recalculate.
- Repeat for additional cells. The newest-first history panel shows the latest 20 entries with their optional questions, so the audit trail stays visible while you work.
- When the session is over, click Clear History to reset the entries, the discarded count, and the current answer in one step.
If you prefer to anchor the Excel side first, the step-by-step static drop-down guide for Excel walks through the validation list and named-range options before you reach for a random source.
How the 50/50 Mapping Stays Balanced
The generator asks Web Crypto for a single 32-bit unsigned integer by calling Crypto.getRandomValues on a one-element Uint32Array. That array holds one integer from 0 through 4,294,967,295, which is the full 2^32 source range. The mapping function treats the binary Yes or No case as a two-outcome problem and computes the largest multiple of the outcome count that fits inside 2^32: floor(2^32 / 2) × 2 = 2^32. Because the multiple equals the source range, every valid Uint32 is accepted, no rejection draw is needed, and the modular mapping (accepted value modulo 2) yields 0 for even values and 1 for odd values. The generator then renders 0 as Yes and 1 as No. With no rejection path actually running, each outcome still receives exactly 2,147,483,648 of the 4,294,967,296 possible source integers, so a 50/50 split is structurally guaranteed.
| Capability | Excel built-in drop-down | Yes or No Generator |
|---|---|---|
| Where the value is set | Cell input or pasted text | Generate Yes or No button |
| Source of randomness | None; user picks | One Uint32 from Web Crypto per click |
| Recalculation behavior | Static until edited | Stable until next click |
| Optional question label | None | Up to 1,000 UTF-16 code units |
| Local history | None in the cell | Newest-first, capped at 20 entries |
| Failure mode | Not applicable | Reports failure if Web Crypto is missing |
| Network upload | Only if workbook syncs | Never; no server is contacted |
The rejection-sampling path that protects general finite mappings is still implemented and tested at a three-outcome boundary, but in the binary case it is dormant: 2 divides 2^32 with no remainder, so no value ever needs to be discarded. MDN's reference for Crypto.getRandomValues documents the typed-array fill behavior that produces the underlying Uint32, and the mapping on top of that integer is local JavaScript, not part of the Web Crypto spec. A bounded 128-draw loop is also wired into the mapper so that a broken or injected source cannot hang the page; in normal browser use the loop completes on the first draw.
When a Yes or No Drop-Down Should Stay Static
A random Yes or No is not advice. Drop-downs that gate medical, legal, financial, safety, security, employment, eligibility, compliance, consent, or emergency choices should never be filled with a casual random prompt, and the generator itself states this limitation in plain language. The 50/50 split is mathematically clean, but the right answer to a high-stakes question can still be Yes when a thoughtful assessment would say No, or vice versa. Web Crypto quality does not substitute for professional judgment, valid choice lists, or an understanding of consequences, and a balanced binary outcome says nothing about whether the question was the right one to ask.
For audit samples, classroom exercises, A/B test assignments, coin-flip logs, and other low-stakes work, the pair of a static Excel drop-down and a browser random source is a sturdy pattern: the cell stays stable, the drop-down keeps the entry clean, and the generator's newest-first history acts as a built-in audit trail that you can clear with a single click when the exercise is done. Editing the question clears the currently displayed answer and any prior error so an outcome cannot be mislabeled against newer wording, while history is preserved for comparison. The monotonically increasing local entry identifier keeps React-style runtime keys unique without acting as a persistent identifier or random data.
If you're weighing options, How to Make a Line Graph in Excel With Multiple Lines covers this in detail.