Module 14 · Data Tools · Only valid shift names

Rafael Souza plans shifts at Bluebird Staffing

Last week, the team leads typed the shifts themselves: nite owl, early, Sunny shift. The payroll system knows only four nicknames: Early Bird, Sunny, Owl and Weekend Hero. Nobody got paid for "nite owl". This week, Rafael allows only names from the list.

Loading the spreadsheet…

Module 14 · Data Tools

Only valid shift names

Rafael Souza, plans shifts at Bluebird Staffing
Rafael Souza plans shifts at Bluebird Staffing

Last week, the team leads typed the shifts themselves: nite owl, early, Sunny shift. The payroll system knows only four nicknames: Early Bird, Sunny, Owl and Weekend Hero. Nobody got paid for "nite owl". This week, Rafael allows only names from the list.

Steps

  1. Make a drop-down list

    Data Validation controls what a cell accepts. With a list, the cell gets an arrow, and you pick a value from it.

    How to do it

    1. Select the cells for the list.
    2. On the Data tab, in the Data Tools group, click Data Validation.
    3. In the Allow box, select List.
    4. In the Source box, type the range with the values, for example =$G$5:$G$8.
    5. Click OK.
    6. Click a cell with the list.
    7. Click the arrow next to the cell.
    8. Click a value in the list.
    9. You can also type the values in the Source box, with commas: Early Bird,Sunny,Owl,Weekend Hero.
    10. With the keyboard, press Alt+↓ (Mac: Option+↓) to open the list.

    Allow: List, Source: =$G$5:$G$8

    Task: Use the lists. Hugo works the Owl shift on Monday. Ben works the Sunny shift on Tuesday.

  2. Write your own error message

    When someone types a value that is not in the list, Excel stops the entry. On the Error Alert tab, you write the message.

    How to do it

    1. Select the cells with the list.
    2. On the Data tab, click Data Validation.
    3. Click the Error Alert tab.
    4. Type a short title.
    5. Type a message that says what to do.
    6. Click OK.
    7. Style Warning and Information let people keep a wrong value. Use Stop when only the list is allowed.

    Title: Unknown shift. Message: Pick a shift from the list.

    Task: Test the message. Type Night in C8 and press Enter. Click Cancel. Then pick Owl for Iris from the list.