---
title: List.Zip – รวม List หลายชุดเข้าด้วยกัน
url: https://www.thepexcel.com/functions/power-query/list-functions/list-zip/
type: function-explainer
program: Power Query
syntax: List.Zip(lists as list) as list
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 4
  usefulness: 5
---

# List.Zip – รวม List หลายชุดเข้าด้วยกัน

> รวม List หลายชุดเข้าด้วยกันตามตำแหน่ง Index

## คำอธิบาย

List.Zip จะรับ List ของ List (เช่น {{List1}, {List2}}) เป็น Input แล้วรวมสมาชิกที่อยู่ในตำแหน่ง Index เดียวกันของแต่ละ List ย่อย มารวมกันเป็น List ย่อยชุดใหม่ใน Output List

## Syntax

```excel
List.Zip(lists as list) as list
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| lists | Yes | list |  | List ของ List ที่ต้องการนำมารวมกัน |

## เคสการใช้งาน

### จับคู่ข้อมูลจากคอลัมน์

เมื่อมีหลายคอลัมน์ที่ข้อมูลเรียงลำดับตรงกัน เช่น ชื่อ, นามสกุล, เบอร์โทรศัพท์ ต้องการจับคู่เป็น List ของ Record

### แปลง List เป็น Table

ใช้ List.Zip เพื่อเตรียมข้อมูลก่อนแปลงเป็นตารางด้วย Table.FromList

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: รวมตัวเลขและตัวอักษร

```excel
List.Zip({{1, 2, 3}, {"a", "b", "c"}})
```

**ผลลัพธ์:** `{{1,"a"}, {2,"b"}, {3,"c"}}`

นำสมาชิกตัวที่ 0 ของแต่ละ List ย่อยมารวมกัน ได้ {1,"a"}, สมาชิกตัวที่ 1 ได้ {2,"b"} และตัวที่ 2 ได้ {3,"c"}

### 2. ตัวอย่างที่ 2: ใช้กับ Table.ToColumns

```excel
List.Zip(Table.ToColumns(Source))
```

**ผลลัพธ์:** `{{Column1_Row1, Column2_Row1}, {Column1_Row2, Column2_Row2}}`

แปลงตารางให้เป็น List ของคอลัมน์ (Table.ToColumns) แล้วนำมา Zip เพื่อรวมข้อมูลแต่ละแถวเข้าด้วยกัน

## คำถามที่พบบ่อย

**Q: ถ้า List ย่อยมีความยาวไม่เท่ากัน?**

ผลลัพธ์ของ List.Zip จะถูกจำกัดด้วยความยาวของ List ที่สั้นที่สุด ส่วนสมาชิกที่เกินมาใน List ที่ยาวกว่าจะถูกทิ้งไป

## ฟังก์ชันที่เกี่ยวข้อง

- [List.Combine – รวม List](https://www.thepexcel.com/functions/power-query/list-functions/list-combine/)
- [Table.FromList – สร้างตารางจาก List](https://www.thepexcel.com/functions/power-query/table-functions/table-fromlist/)

## แหล่งข้อมูลเพิ่มเติม

- [Microsoft Learn: List.Zip](https://learn.microsoft.com/en-us/powerquery-m/list-zip) _(Official Documentation)_
- [PowerQuery.how](https://powerquery.how/list-zip/) _(guide)_

---

_Source: [https://www.thepexcel.com/functions/power-query/list-functions/list-zip/](https://www.thepexcel.com/functions/power-query/list-functions/list-zip/)_
