---
title: Text.BetweenDelimiters – ดึงข้อความระหว่างตัวคั่น
url: https://www.thepexcel.com/functions/power-query/text-functions/text-betweendelimiters/
type: function-explainer
program: Power Query
syntax: "Text.BetweenDelimiters(text as text, startDelimiter as text, endDelimiter as text, optional startIndex as any, optional endIndex as any) as any"
date: 2025-12-03
updated: 2025-12-17
scores:
  popularity: 5
  difficulty: 4
  usefulness: 5
---

# Text.BetweenDelimiters – ดึงข้อความระหว่างตัวคั่น

> ดึงข้อความระหว่างตัวคั่น

## คำอธิบาย

ดึงข้อความที่อยู่ระหว่างตัวคั่น 2 ตัว

## Syntax

```excel
Text.BetweenDelimiters(text as text, startDelimiter as text, endDelimiter as text, optional startIndex as any, optional endIndex as any) as any
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| text | Yes | text |  | ข้อความหลัก |
| startDelimiter | Yes | text |  | ตัวคั่นเริ่มต้น |
| endDelimiter | Yes | text |  | ตัวคั่นสิ้นสุด |

## ตัวอย่าง

### 1. ดึงค่าในวงเล็บ

```excel
Text.BetweenDelimiters("ID(123)Ref", "(", ")")
```

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

ดึงข้อความระหว่าง ( และ )

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

- [Text.Split – แยกข้อความตามตัวคั่นที่กำหนด](https://www.thepexcel.com/functions/power-query/text-functions/text-split/)
- [Text.BeforeDelimiter – ดึงข้อความก่อนตัวคั่น](https://www.thepexcel.com/functions/power-query/text-functions/text-beforedelimiter/)
- [Text.AfterDelimiter – ดึงข้อความส่วนหลังตัวคั่น](https://www.thepexcel.com/functions/power-query/text-functions/text-afterdelimiter/)

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

- [PowerQuery.how](https://powerquery.how/text-betweendelimiters/) _(guide)_

---

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