Create a sorted unique dropdown list from raw data

Extract sorted, deduplicated values from raw operational data to build a clean dynamic Excel dropdown menu.

Text prompt for ChatGPT and Claude

You get: Dynamic Formula, data Validation Setup and pre-365 Alternative Setup

Prompt

Prompt
Act as an Excel operations specialist. Convert raw transaction data into a sorted, unique dropdown list formula.

- Provide modern dynamic array formulas (SORT, UNIQUE, FILTER) to extract clean values automatically.
- Address how to exclude blank rows and zero values from the generated list.
- Provide the exact syntax for the Data Validation Source box to reference the dynamic array.
- Include one fallback formula setup for non-365 Excel users.

Output format:
1. Dynamic Formula (Excel 365 / Web)
2. Data Validation Setup
3. Pre-365 Alternative Setup
4. Common Gotchas

My raw data details and column structure are below:

Example output

Example for: vendor column with repeated entries and blank rows

1. Dynamic Formula (Excel 365 / Web)

Enter this formula in cell M2 (or your preferred helper column) to generate an automatic, deduplicated, sorted list that ignores blanks:

=SORT(UNIQUE(FILTER(A2:A1000, (A2:A1000<="")*(A2:A1000<>0))))

(Adjust A2:A1000 to match your raw vendor column.)

2. Data Validation Setup
  1. Select the cell where you want your dropdown menu (e.g., D2).
  2. Open Data > Data Validation.
  3. Under Allow, select List.
  4. In the Source field, type: =M2#
    (The # operator references the entire spilled range automatically).
  5. Click OK.
3. Pre-365 Alternative Setup

For older Excel versions without dynamic arrays:

  1. Create a Pivot Table using your source table as input.
  2. Place the Vendor field into the Rows area. Sort A-Z and uncheck (blank) in the filter.
  3. Create a dynamic named range pointing to the Pivot Table output: =OFFSET($M$4,0,0,COUNTA($M:$M)-2,1).
  4. Point your Data Validation list to that named range.
4. Common Gotchas
  • #SPILL! Error: Ensure the cells below your helper formula M2 are completely empty.
  • Trailing Spaces: Raw data often has 'Vendor A ' and 'Vendor A'. Clean raw data with =TRIM() to prevent accidental duplicate entries.
Written by AI from this prompt. Your results will vary.

Paste your column names and sample data into ChatGPT, Claude, or Gemini after the prompt. Ask the model to add a filter condition if you need to restrict choices by region or status.

Reuse it: Use in a workflowTurn into a skillAdapt in the builder

Excel & Spreadsheets

Clean phone numbers and postal codes using Excel formulas

Transform irregular contact details into uniform formats for clean CRM imports. Use this whenever raw exports mix dashes, dots, spaces, or leading zeroes.

Excel & Spreadsheets

Create an auto-expanding dropdown list in Excel

Step-by-step instructions to create an Excel data validation dropdown that includes new rows without editing ranges.

Excel & Spreadsheets

Set Up Data Validation Rules That Stop Bad Entries in a Shared Excel Sheet

You get a column-by-column validation plan with allowed values, custom formulas, input and error messages, plus a helper formula that flags rows already holding bad data.

Excel & Spreadsheets

Design a Clean Spreadsheet Layout for a Tracker or Budget That Scales

You get a complete sheet blueprint with tabs, column specs, data types, dropdown lists, summary formulas and setup steps that keep working as rows grow.

Excel & Spreadsheets

Set Up Dependent Dropdown Lists in Excel or Google Sheets Step by Step

Get click-by-click setup for dropdowns and dependent dropdowns in your app, with exact named ranges, INDIRECT or FILTER formulas, and rules for blank or invalid entries.

Excel & Spreadsheets

Automate tiered color coding for approaching deadlines

Build dynamic, time-sensitive conditional formatting rules for due dates. Use this when trackers need automated green, yellow, and red warnings based on today's date.