Function Problems

How to Add Text Options to an Excel Time Drop-Down List

Camila MilosovichCamila Milosovich Oct 14, 2026 869 views

Question details

The user needs to create an employee scheduling drop-down list that includes both time values and specific text codes mapped to predetermined hour counts.

How to Add Text Options to an Excel Time Drop-Down List
Product
Excel
Device & OS
not provided
Scenario
Setting up an employee scheduling spreadsheet where certain text codes (like Vacation or Bereavement) represent 8 working hours, and others (like Off) represent 0 hours.
Observed behavior
The goal is to select a text code from a drop-down list and have the spreadsheet automatically assign the corresponding hours using lookup functions.
Before you start

Before creating your drop-down list, make sure you have a clear list of all the time-off text codes you want to use and their corresponding hour values. It is highly recommended to place this lookup table on a separate, dedicated settings sheet to keep your main schedule interface clean.

Solution 1Recommended

Create a Drop-Down List and Map Hours Using Formulas

This method uses Excel's Data Validation feature to create the text drop-down and utilizes VLOOKUP or XLOOKUP to automatically populate the corresponding hours in another cell based on the user's selection.

By setting up a defined lookup table, you can easily maintain and update your shift hours or absence codes without having to rewrite complex nested IF formulas. This makes scheduling reliable and much easier to manage.

1
Create a lookup table

In a blank column or a new worksheet, type your codes (e.g., Personal, Vacation, Off) in one column and their corresponding hour values (e.g., 8, 8, 0) in the adjacent column right next to it.

2
Name the range

Select the cells containing just your text codes. Click into the Name Box located to the left of the formula bar, type a descriptive name like 'TimeCodes', and press Enter.

3
Apply Data Validation

Highlight the cells where you want the drop-down list to appear on your schedule. Go to the Data tab on the ribbon, select Data Validation, and choose 'List' from the Allow drop-down menu. In the Source box, type '=TimeCodes' and click OK.

4
Calculate hours with a lookup formula

In the cell where the hours should be calculated, enter a lookup formula to retrieve the assigned hours. For example, use =VLOOKUP(A2, LookupTableRange, 2, FALSE) or =XLOOKUP(A2, TimeCodes, HoursRange), where A2 is the drop-down cell.

Create a Drop-Down List and Map Hours Using Formulas
Formula Compatibility: If you are sharing this spreadsheet with users on older versions of Excel, VLOOKUP is highly recommended as XLOOKUP might not be supported on their software. Always use 'FALSE' as the 4th argument in VLOOKUP to ensure it only returns exact matches.
Effortless Spreadsheet Management

Create Advanced Drop-Down Lists in WPS Spreadsheet

WPS Spreadsheet provides a robust and completely free platform to manage employee schedules, set up data validation, and execute complex lookup formulas effortlessly. It works exactly like the spreadsheet software you are already used to.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your employee scheduling workbook.
  2. 2. Create your code list: Type your time-off codes (Personal, Vacation, Off) into a separate column and highlight them to form your lookup table.
  3. 3. Setup Data Validation: Navigate to the 'Data' tab, click 'Validation', select 'List', and highlight your code list for the source.
  4. 4. Apply lookup functions: Use the built-in VLOOKUP or XLOOKUP functions to seamlessly map the selected drop-down text to the corresponding 8 or 0 hour values.
Easily create interactive drop-down lists with the built-in Data Validation feature.Fully compatible with Microsoft Excel file formats (.xlsx) and formulas including VLOOKUP and XLOOKUP.Lightweight, fast, and completely free to use for daily professional or personal tasks.
microsoft office alternative - wps office

Frequently Asked Questions

Can I combine regular time values and text codes in the same drop-down list?

Yes, you can list standard time increments (like 9:00 AM, 10:00 AM) alongside your text codes (Personal, Vacation) in the exact same lookup table range used for your Data Validation source. The drop-down will display all options.

How do I hide the lookup table from other users?

You can place the lookup table on a separate worksheet, right-click the sheet tab at the bottom of the screen, and select 'Hide'. The drop-down list and VLOOKUP formulas on the main sheet will still function normally while keeping the backend data out of sight.

Why is my VLOOKUP returning an #N/A error when I select a code?

An #N/A error usually means the exact text selected in the drop-down doesn't perfectly match the entry in your lookup table. Ensure there are no accidental trailing spaces in either cell and that you set the VLOOKUP range_lookup argument to FALSE for an exact match.

Is XLOOKUP better than VLOOKUP for assigning employee hours?

XLOOKUP is generally more flexible and less prone to breaking when columns are inserted or deleted in your spreadsheet. However, VLOOKUP is more widely compatible with older spreadsheet software versions. Both will work perfectly for this specific task.