How to Automatically Convert Categories to Percentage Values in Excel
Question details
The user wants to automatically populate specific percentage values (0%, 10%, 25%, 50%, or 100%) when a corresponding category is selected from an Excel drop-down list.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Dynamically returning a matching numeric value or percentage based on a user's selection from a data validation drop-down menu.
- Observed behavior
- Upon selecting a category name in one cell, the adjacent cell automatically displays the pre-defined percentage linked to that category.
Before applying any formulas, ensure you have created a reference lookup table in your worksheet (or on a separate hidden sheet) that pairs each category name with its corresponding percentage value.
Use VLOOKUP and IFERROR with a Reference Table
This is the most widely compatible method to retrieve a percentage based on a selected category using a standard lookup table.
By combining VLOOKUP with the IFERROR function, you can ensure that the target cell remains blank until a valid category is selected, preventing unsightly #N/A errors.
In an empty area of your worksheet (e.g., columns F and G), type your category names in the first column and their corresponding percentages (0%, 10%, 25%, 50%, 100%) in the adjacent column.
Select the cell where you want the percentage to be displayed automatically. Right-click, choose 'Format Cells', navigate to the 'Number' tab, and select 'Percentage'.
Click the target cell and enter the formula: =IFERROR(VLOOKUP(A2, F2:G6, 2, FALSE), ""). In this formula, A2 represents your drop-down list cell, and F2:G6 is your newly created lookup table.
Click the drop-down list in cell A2 and select a category. The target cell should immediately populate with the matched percentage.

Use XLOOKUP for Modern Excel Versions
XLOOKUP is a modern, flexible alternative to VLOOKUP that allows you to specify separate return and lookup arrays without needing column index numbers.
Effortlessly Automate Category to Percentage Conversions with WPS Office
WPS Spreadsheet provides full support for advanced lookup functions like VLOOKUP and XLOOKUP, allowing you to seamlessly link drop-down menus to percentage values. It offers a familiar interface for managing large lookup tables and dynamic data validation.
- 1. Open Your File: Launch WPS Spreadsheet and open your existing workbook or create a new one.
- 2. Set Up Data Validation: Select your input cell, navigate to the 'Data' tab, and click 'Data Validation' to establish your category drop-down list.
- 3. Build the Lookup Table: Create a reference table with your categories and corresponding percentages on a secondary sheet.
- 4. Apply Formula: Input your VLOOKUP or XLOOKUP formula to instantly pull the percentage data whenever a drop-down item is selected.

Frequently Asked Questions
Why does my VLOOKUP formula return an #N/A error?
The #N/A error occurs when the exact category selected in the drop-down list cannot be found in the lookup table. Ensure there are no trailing spaces or spelling mismatches between your drop-down list options and the reference table.
How do I create a drop-down list for the categories?
Select the cell where you want the drop-down. Navigate to the 'Data' tab, click 'Data Validation', choose 'List' under the 'Allow' criteria, and highlight your category range as the source.
Can I use nested IF functions instead of a lookup table?
Yes, for a very small number of categories, you can use a formula like =IF(A2="Category 1", 10%, IF(A2="Category 2", 25%, 0%)). However, a lookup table is highly recommended for easier maintenance when dealing with multiple categories.




