Pivoting data to enable validation
This page shows how to pivot a list into separate columns, so that each column can serve as the source of its own data validation drop-down list elsewhere in the workbook.
The data is a list of employees, each with a role type:

Reshaping it with a query means that, when the source is live data that changes often, a refresh keeps the drop-down lists up to date.
1. Load the data into Power Query
Section titled “1. Load the data into Power Query”- Click anywhere in the table, then on Excel’s Data tab click From Table/Range.
The data appears in the Power Query editor like this:

2. Group the table and number each group’s rows
Section titled “2. Group the table and number each group’s rows”- Click the fx button beside the formula bar to add a step, and replace its formula with this:
= Table.Group(Source, {"Role Type"}, {{"Count", (_) => Table.AddIndexColumn(_[[Employee Name]],"idx"), type table}})The formula groups the table by Role Type. The output column keeps the default name Count, but instead of a count it holds a table for each role. Each table lists the role’s employees, and Table.AddIndexColumn adds an idx column that numbers them from 0.

- Click the expand icon on the Count column, and expand all its fields.

Each employee is back on a row of their own, now with a number that restarts at 0 for each role:

3. Pivot the data
Section titled “3. Pivot the data”- Select the Role Type column, then click Pivot Column on the Transform tab.
- Choose Employee Name as the Values Column, and under Advanced options set Aggregate Value Function to Don’t Aggregate.

The idx column decides which row each name lands on, so the first employee of every role shares the first row, the second shares the second row, and so on.
- Remove the idx column, which is no longer needed.
Each role now has a column of its own, ready to be used as a validation list:

- Click Close & Load to return the result to Excel.