A category column that accepts free text will soon hold Books, books and BOOKS, and every total by category will be wrong. A data validation dropdown limits the column to an approved list, so the categories stay consistent from the first row to the last.
Prerequisites
- Excel
- A sheet with a category column and a list of approved categories
- A copy of the source file, so the original stays untouched.
Steps
- Type the approved categories in a list on a separate sheet, one per cell.
- Select the category column in the main table, then go to Data, Data Validation.
- Set Allow to List, and set the Source to the range holding the approved categories.
- Choose whether invalid entries are rejected or only warned about, then click OK.
- Test the dropdown on a new row and confirm an unlisted value is refused.
Worked example: Fictional bookshop categories dropdown
The practice table below is a fictional five-sale list using only approved categories. The amount column is the sale value, and the total is their sum. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.
| Category | Amount |
|---|---|
| Books | 15.00 |
| Books | 22.50 |
| Stationery | 11.25 |
| Stationery | 16.75 |
| Books | 19.50 |
| Total | 85.00 |
Expected result. Two approved categories only, each sale in one of them, and the amounts add to 85.00.
Limits
- A dropdown does not fix values already typed, so clean the column before adding the rule.
- A list stored on a hidden sheet is easy to forget, so name the range clearly.
