---
title: Text.End – ดึงอักขระจากท้ายข้อความ
url: https://www.thepexcel.com/functions/power-query/text-functions/text-end/
type: function-explainer
program: Power Query
syntax: "Text.End(text as nullable text, count as number) as nullable text"
date: 2025-12-04
updated: 2025-12-17
scores:
  popularity: 6
  difficulty: 2
  usefulness: 6
---

# Text.End – ดึงอักขระจากท้ายข้อความ

> ดึงอักขระจำนวนที่ระบุจากท้าย

## คำอธิบาย

Text.End ใช้สำหรับดึงอักขระจำนวนที่ระบุจากท้ายสตริงข้อความ เป็นประโยชน์สำหรับการดึงนามสกุลไฟล์ และส่วนท้ายของข้อมูล

## Syntax

```excel
Text.End(text as nullable text, count as number) as nullable text
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | nullable text |  | ข้อความต้นฉบับที่ต้องการประมวลผล |
| count | Yes | number |  | จำนวนอักขระที่ต้องการดึงจากท้าย |

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

### ดึงนามสกุลไฟล์จากชื่อไฟล์เต็ม

ดึงนามสกุลไฟล์จากชื่อไฟล์เต็ม

### ดึงส่วนท้ายของรหัส ID หรือหมายเลข

ดึงส่วนท้ายของรหัส ID หรือหมายเลข

### แยกรหัสเขต จังหวัร หรือส่วนท้ายของข้อมูล

แยกรหัสเขต จังหวัร หรือส่วนท้ายของข้อมูล

## ตัวอย่าง

### 1. ดึงนามสกุลไฟล์

```excel
Text.End("document.pdf", 3)
```

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

ดึง 3 อักขระสุดท้าย 'pdf' จาก 'document.pdf'

### 2. ดึง 5 อักขระจากท้าย

```excel
Text.End("Hello, World", 5)
```

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

ดึง 5 อักขระสุดท้าย 'World'

### 3. ดึงรหัสเขต

```excel
Text.End("New York 10001", 5)
```

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

ดึง 5 ตัวเลขสุดท้ายเป็นรหัสไปรษณีย์

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

- [Text.Start – ดึงอักขระจากตัวแรกของข้อความ](https://www.thepexcel.com/functions/power-query/text-functions/text-start/)
- [Text.At – ดึงอักขระที่ตำแหน่งที่ระบุ](https://www.thepexcel.com/functions/power-query/text-functions/text-at/)
- [Text.Middle – ดึงข้อความจากตรงกลาง](https://www.thepexcel.com/functions/power-query/text-functions/text-middle/)
- [Text.Range – ดึงช่วงของข้อความ](https://www.thepexcel.com/functions/power-query/text-functions/text-range/)

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

- [Microsoft Learn: Text.End](https://learn.microsoft.com/en-us/powerquery-m/text-end) _(Official Documentation)_

---

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