The List.Zip function in Power Query takes two or more lists and pairs up their items by position. The first items go together, then the second items, and so on, like the two sides of a zipper coming together.
This is handy whenever your data sits in separate lists that belong together, like names in one list and values in another. In this article, I’ll show you how List.Zip works with practical examples.
Follow along with the example file
List.Zip Function Examples.xlsx
List.Zip Function Syntax
= List.Zip(lists as list) as list
- lists – a list of lists that you want to combine. All the lists go inside one pair of outer curly brackets, like
{{1,2},{3,4}}.
What it returns – a list of lists. The first inner list holds the first item of every list, the second inner list holds the second item of every list, and so on.
If the lists aren’t the same length, the shorter ones are filled with null, so you get as many inner lists as there are items in the longest list.
The List.Zip function works in Power Query in Excel for Microsoft 365, 2024, 2021, 2019, 2016, and Excel for Mac (Microsoft 365), as well as in Power BI.
When to Use the List.Zip Function
Use this function when you need to:
- Pair items from two or more lists by their position
- Build a table from separate lists with the Table.FromRows function
- Rename or set the type of every column using a list of new names or types
- Compare each value in a list with the value right before it
- Split cells that hold matching lists (like items and their quantities) into rows, while keeping each item with its own value
Example 1: Pair Up Two Lists
Let’s start with a simple example, so you can see what List.Zip gives you.
Suppose you have a list of three swimmers and a list of the lanes they’re swimming in, in the same order, and you want each swimmer paired with their lane.
Create a new blank query (Data > Get Data > From Other Sources > Blank Query) and use this formula:
= List.Zip({{"Judith Kennedy","Hailey Martin","Vanessa Wells"},{3,5,1}})
Result: a list of three items, and each item shows List

Here, the first list has the swimmer names and the second has the lane numbers. List.Zip takes the first item from each list and puts them together, then the second items, and then the third.
So you get three small lists, one per swimmer. Power Query doesn’t show what’s inside a nested list in the preview, it just shows List.
To peek inside one, click on the empty space next to List (not on the word itself), and its values show up in a small pane at the bottom.
You can also get one pair by its position. Use this formula to get the first pair:
= List.Zip({{"Judith Kennedy","Hailey Martin","Vanessa Wells"},{3,5,1}}){0}
Result: a list with Judith Kennedy and 3

Here, {0} picks the first item of the result, because positions in Power Query start at 0. So {1} would give you Hailey Martin with lane 5.
Note that List.Zip takes just one argument, the list of lists. If you write List.Zip({...},{3,5,1}) with the two lists as separate arguments, you get the error “2 arguments were passed to a function which expects 1.”
Example 2: Build a Table from Separate Lists
Most of the time, though, you’ll want the result as a table rather than a list of pairs.
Suppose you have three lists for a few tour bookings, one with the guest names, one with the tours, and one with the number of seats, and you want them as a table with Guest, Tour, and Seats columns.
Create a new blank query and use this formula:
= Table.FromRows(
List.Zip({{"Maria King","Cynthia Jones","Darren Brown"},{"Harbor Cruise","City Walk","Food Tour"},{2,4,1}}),
{"Guest","Tour","Seats"}
)
Result: a three-column table where Maria King has 2 seats on the Harbor Cruise, Cynthia Jones has 4 on the City Walk, and Darren Brown has 1 on the Food Tour

Here, List.Zip pairs up the three lists into three small lists, one per booking, like {“Maria King”,”Harbor Cruise”,2}. Each of those is a complete row.
The Table.FromRows function takes a list of rows and turns it into a table, with the column names you give it in the second argument.
If you skip the column names, the table gets generic names like Column1 and Column2. Also, the new columns don’t carry any data types, so set the types if you need them.
The Table.FromColumns function gives you the same table straight from the three lists, without List.Zip. But the List.Zip pattern is worth knowing, because the rest of the examples in this article use the same idea.
Example 3: Zip Lists of Different Lengths
This next one shows what happens when your lists don’t have the same number of items.
Suppose you have four tasks for an event and only three volunteers so far, and you want a table that shows who’s on each task and which task still has no one.
Create a new blank query and use this formula:
= Table.FromRows(
List.Zip({{"Setup","Registration","Catering","Cleanup"},{"Donald Edwards","Tammy Hughes","Samuel Morris"}}),
{"Task","Volunteer"}
)
Result: a two-column table where Setup has Donald Edwards, Registration has Tammy Hughes, Catering has Samuel Morris, and Cleanup has null

Here, the task list has four items and the volunteer list has only three.
List.Zip doesn’t drop the extra task. It keeps going until the longest list runs out and fills the missing spot with null.
So Cleanup shows up with null as the volunteer, which is an easy way to spot the task that still needs someone.
This works with any number of lists. When you zip three lists of different lengths, every list that runs out early gets null in the remaining positions.
Example 4: Rename All Columns Using a List of New Names
This is one of the most practical uses of List.Zip.
Below is an export from a vet clinic where the columns came in as Column1 to Column4, and I want to rename them to Pet, Owner, Visit Type, and Fee.

In the example file, each table-based example is on its own sheet, and the finished queries are under Data > Queries & Connections.
To follow along, select any cell in the table and go to Data > From Table/Range to open it in the Power Query Editor. If Power Query adds a Changed Type step, use #"Changed Type" in place of Source in the formulas in this article.
Add a new step (by clicking on the fx icon next to the formula bar) and use this formula:
= Table.RenameColumns(Source,List.Zip({Table.ColumnNames(Source),{"Pet","Owner","Visit Type","Fee"}}))
Result: the same table with the columns renamed to Pet, Owner, Visit Type, and Fee

Here, the Table.RenameColumns function needs the renames as a list of pairs, with the old name first, like {{"Column1","Pet"},{"Column2","Owner"}}.
The Table.ColumnNames function gives the current names as a list, {“Column1″,”Column2″,”Column3″,”Column4”}. List.Zip pairs that list with the list of new names, which gives exactly the list of pairs the Table.RenameColumns function wants.
The benefit is that you only type the new names. You don’t have to type every old name and keep each one next to its new name.
This works by position, so the first new name goes to the first column, and so on. Make sure the new names are in the same order as the columns.
If the export ever changes its column order but keeps the same number of columns, the names land on the wrong columns without any error. So it’s worth a quick look at the result after a refresh.
Important: The number of new names must match the number of columns. If you have one name too few or too many, List.Zip fills the gap with null, and you get the error “We expected a RenameOperations value.”
If the real column names are sitting in the first row of the data, the Table.PromoteHeaders function (Home > Use First Row as Headers) is the simpler fix.
Follow along with the example file
List.Zip Function Examples.xlsx
Example 5: Set the Data Type of Every Column
Here’s a similar trick for data types.
Below is a greenhouse sensor log with the reading date, greenhouse, temperature in °C, and humidity in %, and I want to set the right data type for all four columns in one step.

This example is the one exception to the #"Changed Type" tip from Example 4. If you loaded the table with From Table/Range, delete the Changed Type step that Power Query added, because this formula is meant to set the types itself.
Once that step is gone, every column has the type any (the ABC123 icon in the header). That’s also how the queries in the example file read the table.
Add a new step and use this formula:
= Table.TransformColumnTypes(Source,List.Zip({Table.ColumnNames(Source),{type date,type text,type number,Int64.Type}}))
Result: the same table where Reading Date is a date (3/2/2026, 3/3/2026), Greenhouse is text, Temperature (°C) is a decimal number, and Humidity (%) is a whole number

Here, the Table.TransformColumnTypes function wants a list of pairs too, with a column name and a type in each pair, like {"Reading Date",type date}. List.Zip builds those pairs from the column names and the list of types.
Int64.Type is the whole number type. So Humidity (%) becomes a whole number, while Temperature (°C) becomes a decimal number with type number.
The dates show as 3/2/2026 because of US regional settings. A UK machine shows 02/03/2026 for the same date, but the value is the same.
Since each type is matched to a column by position, the types must be in the same order as the columns. If the list has fewer types than there are columns, you get the error “We cannot convert the value null to type Type.”
Important: If your source columns can change order, the types land on the wrong columns, so a text column shows errors and a decimal like 22.4 quietly becomes 22. Set the types from the column headers instead, which ties each type to its column name.
Example 6: Find the Change from the Previous Month
Now let’s use List.Zip with the same list twice, to compare each value with the one before it.
Below is a table with the number of new members a gym got each month from January to June, and I want a list of how much that number went up or down each month.

Add a new step and use this formula:
= List.Transform(List.Zip({List.RemoveLastN(Source[New Members],1),List.Skip(Source[New Members])}),each _{1}-_{0})
Result: a list of five numbers: 7, -4, 12, 7, and -4

Here, Source[New Members] gives the column as a list, {48,55,51,63,70,66}. The List.RemoveLastN function drops the last value, so you get January to May, and the List.Skip function drops the first value, so you get February to June.
List.Zip then pairs these two lists, so each month sits next to the month before it, like {48,55} for January and February.
The List.Transform function runs the same calculation on each pair. _ is the current pair, so _{1}-_{0} takes the later month and subtracts the earlier one.
So the first value, 7, is the change from January to February (55 minus 48). You get five values for six months, because January has no month before it.
The nice thing about this approach is that it doesn’t need an index column or a lookup of the previous row, which is how you’d often do this with the Power Query buttons.
Example 7: Split Matching Items and Quantities into Rows
This last one solves a problem that’s hard to handle with the Power Query buttons alone.
Below is a table of craft supply orders, where each order lists its items in one cell and the matching quantities in another, and I want one row for each item with its own quantity.

The table is an Excel Table named CraftOrders, and the code below reads it by that name. For your own data, change the name to match your table.
Create a new blank query, open the Advanced Editor (Home > Advanced Editor), and use this code:
let
Source = Excel.CurrentWorkbook(){[Name="CraftOrders"]}[Content],
#"Added Lines" = Table.AddColumn(Source,"Lines",each Table.FromRows(List.Zip({Text.Split([Items],", "),Text.Split([Qty],", ")}),{"Item","Qty"})),
#"Removed Columns" = Table.RemoveColumns(#"Added Lines",{"Items","Qty"}),
#"Expanded Lines" = Table.ExpandTableColumn(#"Removed Columns","Lines",{"Item","Qty"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Lines",{{"Order ID",type text},{"Item",type text},{"Qty",Int64.Type}})
in
#"Changed Type"
Result: a table with seven rows, one for each item, where CO-301 has Buttons 40, Yarn 4, and Needles 2, CO-302 has Glue Gun 1 and Glue Sticks 3, and CO-303 has Ribbon 2 and Beads 5

Here, for each order, the Text.Split function turns the Items cell into a list, like {“Buttons”,”Yarn”,”Needles”}, and the Qty cell into a list, like {“40″,”4″,”2”}.
List.Zip pairs these two lists so each item sits with its own quantity, like {“Buttons”,”40″}. The Table.FromRows function turns those pairs into a small table with Item and Qty columns, and that small table goes in the new Lines column.
The Removed Columns step then drops the original Items and Qty columns, and the Table.ExpandTableColumn function expands each small table into rows. The Order ID repeats on every row that belongs to it.
After the expand, the quantities are still text, because the Text.Split function returns text. So the last step, Changed Type, sets Qty to a whole number (and the other two columns to text), so you can add up the quantities later.
You might think of using Split Column > By Delimiter > Rows on both columns instead. But splitting the second column repeats every quantity for every item, so CO-301 alone turns into nine rows with the wrong quantities.
Note that the split uses a comma followed by a space as the delimiter, because that’s how the cells are typed. If your cells use just a comma, change ", " to "," in both Text.Split parts.
You can also build the same small table with Table.FromColumns({Text.Split([Items],", "),Text.Split([Qty],", ")},{"Item","Qty"}), which takes the two lists as columns. Both give the same result here, so use whichever reads more naturally to you.
This relies on each order having the same number of items and quantities. If a Qty cell has an extra value, you get an extra row with null as the item instead of an error, so it’s worth a quick check.
Other Excel Articles You May Also Like:
- List.Combine – Use List.Combine in Power Query M to join lists into one.
- Table.ToRows – Use Table.ToRows in Power Query M to turn table rows into lists.
- List.Union – Use List.Union in Power Query M to combine lists without repeats.
- Table.ExpandListColumn – Use Table.ExpandListColumn in Power Query M to turn lists into rows.
- Table.ToList – Use Table.ToList in Power Query M to turn each table row into one value.
- Table.FromList – Use Table.FromList in Power Query M to turn a list into a table.
- Table.Combine – Use Table.Combine in Power Query M to stack multiple tables into one by appending rows.
- Table.ExpandTableColumn – Use Table.ExpandTableColumn in Power Query M to expand merged table columns.