TheLibreOffice.com

LibreOffice Calc Data Validation: Make a Drop-Down List

Build and maintain Calc drop-down lists, set clear input rules, check pasted records, and preserve a useful editable copy.

Make a drop-down. A paper spreadsheet cell with an arrow and three choices.

To create a drop-down list in LibreOffice Calc, select the input cells and choose Data → Validity → Criteria. Set Allow to List for options typed into the dialog, or Cell range for options stored in cells, and enable Show selection list. I'd use a cell range for a workbook someone will maintain: the choices stay visible and can serve several input areas.

Set the error alert separately if you want Calc to reject an invalid typed value. A working arrow doesn't prove that existing or pasted records obey the rule, so check those before using the finished data.

For a first dropdown, follow the status-list example. For a specific change, jump to the relevant step:

Make a status list for several rows

Use this small example to separate the cells people fill in from the cells that supply their choices. Put Status in C1 and use C2:C20 for request statuses. Put a source heading in F1, then enter New, In review, and Done in F2:F4, one option per cell.

  1. Select C2:C20, the destination for the dropdown. Keep C1 outside the selection.
  2. Open Data → Validity. On the Criteria tab, choose Cell range under Allow.
  3. In Source, enter $F$2:$F$4, or use the range selector to choose those cells. Exclude the source heading in F1.
  4. Enable Show selection list. Leave Sort entries ascending off so the choices follow the workflow order.
  5. On Error Alert, enable Show error message when invalid values are entered, choose Stop, and enter “Choose New, In review or Done.” Click OK.
  6. Select a different cell, then return to C2. Open its arrow and choose a status. Repeat at C20 to check the bottom of the selected input area.

With an input cell selected, you can also open the list with Alt+Down Arrow, or Option+Down Arrow on a Mac. The Show selection list setting supplies the dropdown; it doesn't determine whether an invalid typed entry is rejected.

Keep the source in one column or one row. A rectangular source spanning several rows and columns uses only its first column, which can explain missing choices. The dollar signs in $F$2:$F$4 keep the row and column addresses fixed when the rule is copied within this sheet.

Type a short list directly

For a small list that rarely changes, such as Yes and No, you can skip source cells. Select the destination, open Data → Validity → Criteria, choose List, and type each choice on its own line in Entries:

Yes
No

Enable Show selection list, set the alert you need, and click OK. Don't type Yes,No as though this were Excel's Source box. Calc's Entries box uses separate lines for separate choices.

Validity Criteria with Allow set to List, Yes and No on separate lines, and Show selection list enabled.
Use a List rule for a short fixed set of choices and enable the selection list for the input cells. View this interface detail at full size.

To change the options later, select the input range and edit Entries. A direct list is convenient for one stable input area. When the same choices appear on several sheets, I'd move them to a named source so an editor has one place to maintain them.

Use choices from another sheet

A separate sheet keeps a longer source list out of the form without tying the rule to an external workbook. Create a sheet called Lists, put a heading in A1, and enter the three statuses in A2:A4. Give that range a document-wide name:

  1. Select A2:A4 on Lists.
  2. Choose Sheet → Named Ranges and Expressions → Define.
  3. Enter RequestStatus as the name. Confirm that the range points to those three source cells and set Scope to Document (Global). Add the name and close the dialog.
  4. Return to the input sheet and select C2:C20. In Data → Validity → Criteria, choose Cell range and enter RequestStatus in Source.
  5. Enable the selection list, keep the intended sort and alert settings, and confirm with OK. Check a choice at both ends of the destination.
Validity Criteria using Cell range and the RequestStatus named source, with the selection list enabled.
Point the rule at the maintained choice cells, then check the first and last permitted value from an input row. View this interface detail at full size.

LibreOffice's Define Names dialog distinguishes document-wide and sheet-specific names. Choose the document-wide scope when several sheets need the same list. A name also makes the purpose of the source easier to recognize than a bare cell address.

You can use a direct cross-sheet range instead. Use the range selector to pick the source on Lists and inspect the resulting sheet-qualified address. For a shared workbook, I'd keep the source heading and sheet name descriptive so the next person can find the choices without decoding the rule.

Keep the choices and input rows current

Changing the choices and extending the form are different edits. In the first example, the choices live in F2:F4; the input rule belongs to C2:C20. Updating one area doesn't automatically expand the other.

Change you needWhat to update
Rename an existing optionEdit its source cell. Review records that still contain the old wording; changing the source doesn't rewrite those records.
Add a choice in F5Change the direct Source to $F$2:$F$5 for the relevant input cells.
Add a choice below a named sourceExtend the named range to include the new cell, then check a dropdown that uses it.
Add more input rows below C20Apply the intended Validity rule to those new destination cells, or copy it with Formats.

To extend RequestStatus, choose Sheet → Named Ranges and Expressions → Manage, select the name, and change Range or formula expression to include the added source cell. The Manage Names dialog lets you change the referenced area. Confirm the change, then inspect the list. A name pointing to exactly three cells doesn't become a growing catalog merely because it has a name.

Sort entries ascending changes both order and duplicate display: it sorts the choices and filters duplicates out of the dropdown. Leave it off for a meaningful sequence such as New, In review, Done. If you want to preserve that sequence and remove repeated options, tidy the source itself.

Use Case Sensitive only when capitalization is part of the rule. With it enabled, a source value of North doesn't validate north. Otherwise keep the spellings consistent in the source rather than making users guess which form a report expects. Avoid padding the source with unused blank rows when a precise range is easy to maintain.

Decide whether a bad entry should stop the user

For a controlled status field, I'd use Stop with a message that names the allowed choices. In Error Alert, enable Show error message when invalid values are entered and select the action deliberately. Don't rely on a workbook's inherited settings.

ActionWhat happens to an invalid typed entry
StopCalc rejects it and restores the previous cell value.
Warning or InformationOK accepts the invalid entry; Cancel rejects it.
Reject Silently, where availableCalc retains the current value without an error dialog.

The Error Alert actions have different acceptance behavior. A warning is suitable when exceptions are legitimate and someone will review them. Silent rejection is harder for a person filling in a form to diagnose. After changing an action and closing the dialog, select another cell before checking the edited rule.

Validity Error Alert with Action Stop and the message Choose New, In review or Done.
Use Stop when an invalid typed entry must be rejected; check pasted and pre-existing values separately. View this interface detail at full size.

For occasional custom entries, use Warning or Information and explain that OK accepts a value outside the list. That exception can still be flagged in a later invalid-data check. Don't assume that simply hiding an error message gives every Calc version the same free-entry behavior; check the action and the resulting cell value in the copy you plan to share.

Decide separately what an empty cell means. The Allow blank cells option controls whether blanks are marked by Tools → Detective → Mark Invalid Data. Clearing it helps identify missing entries in that check; it doesn't fill them, and it isn't a complete mandatory-field system against deletion or pasted data.

Explain the rule before someone breaks it

Open Input Help and enable Show input help when cell is selected. Add a title such as “Request status” and a message such as “Choose the current status. Add new choices on the Lists sheet.” A reviewer who never clicks that cell won't see the popup, so keep essential instructions in a visible heading or note too.

Validity also handles columns that need a limit rather than a dropdown. For a quantity from 1 to 10, select the quantity cells, choose Whole numbers, set Data to between, and enter 1 and 10 as the endpoints. Use the Stop alert, then check 1, 10, 11, and 1.5 in a copy: the endpoints meet this rule, while 11 is outside the range and 1.5 isn't a whole number.

For a short item code, choose Text length and set a maximum of five characters with less than or equal to. With Stop enabled, try AB123 and AB1234. For a shift log, choose Time and set between to 08:00 and 17:00. Try both endpoints and 17:01. Calc accepts locally formatted times and dates in validity rules.

Require unique numeric IDs

For numeric IDs in A2:A100, select that range with A2 active, choose Allow → Custom, and enter COUNTIF($A$2:$A$100;A2)=1 in Formula. The Custom criterion evaluates the rule with the entered value; COUNTIF counts matching cells, so the rule requires one occurrence inside that range. Use the Stop alert and check a fresh ID such as 101, a second 101, and then 102 in a copy.

Extend both the rule and its counted range when adding ID rows. This is an entry check, not a database uniqueness constraint: it doesn’t prevent duplicates outside that area or make pasted and existing records safe. Check those with Detective as described below.

Check existing values and pasted rows

Calc's entry check doesn't run on existing contents, copy/paste, or drag-and-drop. A pasted status of Delayed can therefore remain in the sheet even when the allowed choices are New, In review, and Done. Selecting Stop doesn't close that gap.

  1. After pasting, select a destination cell and reopen Data → Validity. Confirm that the intended rule is still there. A full-cell paste can bring cell formatting, including a different validation rule.
  2. Use Tools → Detective → Mark Invalid Data. Review the marked cells against the rule and the intended source.
  3. Correct the records. If an old status was renamed, decide which current option the old wording should become; don't replace it blindly across unrelated columns.
  4. Choose Tools → Detective → Remove All Traces to clear the marks, then run Mark Invalid Data again if you need a fresh check.

Removing traces only clears the marks. It doesn't repair data. Detective also needs a validity rule to evaluate, so a clean-looking sheet after the rule was overwritten proves nothing about the entries.

For shared templates, sheet protection doesn't separately lock validation in cells that remain editable. Calc's request to protect validation while allowing value edits is still open. Unlocking input cells before protecting the sheet lets people fill them in; it doesn't make their rules safe from a full-cell paste. Give collaborators a values-only paste method and check returned copies.

For incoming records, use a values-only paste into an already configured input area. To extend the form, copy a correctly configured cell, select the new destination, and choose Edit → Paste Special → Paste Special. Clear Paste all and select only Formats to transfer the rule without replacing the destination values. This also copies other cell formatting, so inspect number formats, borders, and colors afterward.

The Calc Guide confirms that validity belongs to the cell format. Check the source and alert at the first and last copied cells. To remove the restriction while keeping the values, select the target cells, open Validity → Criteria, and set Allow to All values. Avoid Delete all in Delete Contents unless you intend to remove the contents and formatting as well.

Fix a dropdown that doesn't behave as expected

SymptomCheck first
No dropdown arrowSelect an actual input cell, then confirm List or Cell range and Show selection list. Check that this cell belongs to the configured destination.
Only one long option appearsIn a direct List, put each choice on a separate line in Entries.
A heading or wrong options appearInspect Source. Exclude the heading and choose one source row or column.
New choices are missingCheck whether the appended cells fall inside the direct or named source.
The bottom rows have no listApply or copy the rule to the new destination rows.
An invalid typed value is acceptedInspect Error Alert. Enable the error message and use Stop if exceptions aren't allowed.
Invalid pasted values remainConfirm the rule survived, then run Mark Invalid Data and correct the records.

A list doesn't automatically populate the first option as a default. Choose or enter New in the relevant cells if that is the starting status you want, and check that you haven't overwritten existing requests.

Separate search, colors, and multiple choices

AutoInput completes text from earlier entries in the same column. It isn't a search through a separate catalog used as a validity source; LibreOffice documents AutoInput's same-column basis. Typing after opening a dropdown can behave differently by version and platform, as the searchable-list discussion shows. For a large catalog, check the exact search behavior you need, especially substring matches, before building the form around it.

A normal validity dropdown selects one value per cell. It has no “Allow multiple entries” checkbox for accumulating selections. If each request can have several categories, separate category fields or one request-category row per selection are easier to filter than a comma-packed cell. A multi-select form control or macro is a separate design decision, with its own maintenance and file-exchange requirements.

If the second dropdown should follow the first, give each set of options a document-wide name. For example, name one range Hardware and another Supplies. Make H2 a List rule with those exact names as its two choices.

In I2, set Allow to Cell range, enter INDIRECT($H2) in Source, and enable Show selection list. INDIRECT uses the text in H2 as a reference. Choose Hardware and open I2, then choose Supplies and check that the list changes. Clear the old item after changing its category. A new source list leaves the value already in I2 in place.

Colors need a separate formatting rule on the destination. Choosing a value doesn't copy the source cell's fill color. For a status tracker, apply conditional formatting to the status cells or whole request rows, using the status text as the condition. Keep the allowed-value list responsible for choices and the formatting rule responsible for their appearance.

Open the XLSX before handing it off

Keep an ODS master and save a separate XLSX copy for an Excel recipient. Range-based sources are the safer starting point for long lists: LibreOffice Help specifies a 255-character limit when direct List entries are saved in Excel formats. That's characters across the list, not 255 choices. Don't assume that an arrow surviving conversion proves the whole workbook is ready.

Open the actual XLSX in the recipient's application. In desktop Excel, the corresponding controls are under Data → Data Validation. Check the source, choose a value, try an invalid typed entry, inspect a blank, and check the last input row. If the file will come back, make a small edit in a copy, save it in Excel, and reopen it in Calc. Verify the choices and error behavior again. The Calc and Excel comparison covers the wider workbook features that also need a return-copy check.

CSV is for transferring the selected values, not the working dropdown. LibreOffice's CSV export saves the active sheet's data and discards formatting, including the cell-format rule that supplies validation. Keep the editable ODS or checked XLSX separately.

Before sharing, check one first-row choice, one last-row choice, one invalid typed value, and one pasted value in a copy. That small review covers the ways people will enter records. Use the Calc guide hub for the formulas and file-handling steps that follow once those records are consistent.

Filed under Calc