---
title: List.ReplaceMatchingItems – แทนที่รายการที่ตรงกัน
url: https://www.thepexcel.com/functions/power-query/list-functions/list-replacematchingitems/
type: function-explainer
program: Power Query
syntax: List.Replacematchingitems(list as list) as list
date: 2025-12-12
updated: 2025-12-17
scores:
  popularity: 4
  difficulty: 4
  usefulness: 4
---

# List.ReplaceMatchingItems – แทนที่รายการที่ตรงกัน

> แทนที่รายการที่ตรงกัน

## คำอธิบาย

List.ReplaceMatchingItems แทนที่รายการที่ตรงกับเงื่อนไขด้วยค่าใหม่ ใช้สำหรับการแปลงข้อมูล การแทนที่มูลค่า และการทำความสะอาดข้อมูล

## Syntax

```excel
List.Replacematchingitems(list as list) as list
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| list | Yes | list |  | รายการที่ต้องการประมวลผล |

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: ใช้งานพื้นฐาน

```excel
List.Replacematchingitems({1, 2, 3, 4, 5})
```

**ผลลัพธ์:** `ผลลัพธ์`

สูตรนี้ใช้ฟังก์ชันกับรายการอย่างง่าย

### 2. ตัวอย่างที่ 2: ใช้กับข้อมูลจริง

```excel
List.Replacematchingitems(SourceData)
```

**ผลลัพธ์:** `ผลลัพธ์จากข้อมูล`

สูตรนี้ใช้ฟังก์ชันกับข้อมูลจากแหล่งข้อมูลภายนอก

### 3. ตัวอย่างที่ 3: ใช้ในสูตรที่ซับซ้อน

```excel
let Data = {...}, Result = List.Replacematchingitems(Data) in Result
```

**ผลลัพธ์:** `ผลลัพธ์สุดท้าย`

สูตรนี้ใช้ฟังก์ชันภายในโครงสร้าง let-in

## หมายเหตุเพิ่มเติม

⚠️ สูตรนี้ใช้สำหรับการประมวลผลรายการข้อมูล

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

**Q: ฟังก์ชันนี้ใช้ทำไม**

List.ReplaceMatchingItems แทนที่รายการที่ตรงกับเงื่อนไขด้วยค่าใหม่ ใช้สำหรับการแปลงข้อมูล การแทนที่มูลค่า และการทำความสะอาดข้อมูล

**Q: สามารถใช้กับประเภทข้อมูลต่างๆ ได้หรือไม่**

ได้ ฟังก์ชันนี้ยืดหยุ่นและสามารถใช้กับประเภทข้อมูลต่างๆ

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

- [List.Select – เลือกสมาชิกจาก List ตามเงื่อนไข](https://www.thepexcel.com/functions/power-query/list-functions/list-select/)
- [List.Transform – แปลงค่าในลิสต์แต่ละตัว](https://www.thepexcel.com/functions/power-query/list-functions/list-transform/)

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

- [Microsoft Learn: list.replacematchingitems](https://learn.microsoft.com/en-us/powerquery-m/list-replacematchingitems) _(documentation)_

---

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