---
title: Text.Remove – ลบอักขระที่ไม่ต้องการ
url: https://www.thepexcel.com/functions/power-query/text-functions/text-remove/
type: function-explainer
program: Power Query
syntax: "Text.Remove(text as nullable text, removeChars as any) as nullable text"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 3
  usefulness: 5
---

# Text.Remove – ลบอักขระที่ไม่ต้องการ

> ลบตัวอักษรที่กำหนดออกจากข้อความ

## คำอธิบาย

Text.Remove จะคืนค่าข้อความใหม่ที่ตัดตัวอักษรที่อยู่ใน removeChars ออกไปทั้งหมด เป็นฟังก์ชันตรงข้ามกับ Text.Select

## Syntax

```excel
Text.Remove(text as nullable text, removeChars as any) as nullable text
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | text |  | ข้อความต้นฉบับ |
| removeChars | Yes | list |  | List ของตัวอักษรที่ต้องการลบออก (เช่น {"a".."z"}) |

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

### ลบสัญลักษณ์พิเศษ

ลบเครื่องหมาย #, *, % ออกจากข้อความเพื่อให้เหลือแต่เนื้อหา

### ลบตัวเลขออกจากชื่อ

ถ้าชื่อคนมีตัวเลขปนมา (เช่น John123) สามารถลบ 0-9 ออกได้

## ตัวอย่าง

### 1. ตัวอย่างที่ 1: ลบสัญลักษณ์

```excel
Text.Remove("Price: $100", {"$", ":", " "})
```

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

ลบเครื่องหมาย $, : และช่องว่างออก

### 2. ตัวอย่างที่ 2: ลบตัวพิมพ์ใหญ่

```excel
Text.Remove("AbCdEf", {"A".."Z"})
```

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

ลบตัวอักษร A ถึง Z (ตัวพิมพ์ใหญ่) ออกทั้งหมด

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

**Q: Text.Remove ต่างจาก Text.Replace อย่างไร?**

Text.Remove ลบอักขระทิ้ง (แทนที่ด้วยค่าว่าง) และรับ Input เป็น List ของอักขระหลายตัวได้ง่ายกว่า Text.Replace ที่แทนที่ทีละคำ

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

- [List.RemoveItems – ลบสมาชิกที่กำหนดออกจาก List](https://www.thepexcel.com/functions/power-query/list-functions/list-removeitems/)
- [Text.Clean – ลบตัวอักษรควบคุมออกจากข้อความ](https://www.thepexcel.com/functions/power-query/text-functions/text-clean/)
- [Text.Replace – แทนที่ข้อความใน Power Query](https://www.thepexcel.com/functions/power-query/text-functions/text-replace/)
- [Text.Select – เลือกเฉพาะอักขระที่ต้องการ](https://www.thepexcel.com/functions/power-query/text-functions/text-select/)
- [Text.RemoveRange – ลบข้อความจากช่วงที่ระบุ](https://www.thepexcel.com/functions/power-query/text-functions/text-removerange/)

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

- [Microsoft Learn: Text.Remove](https://learn.microsoft.com/en-us/powerquery-m/text-remove) _(Official Documentation)_
- [PowerQuery.how](https://powerquery.how/text-remove/) _(guide)_

---

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