Thep Excel

Text.PositionOf – หาตำแหน่งข้อความ

หาตำแหน่งข้อความ

หาตำแหน่งแรกที่พบข้อความย่อย (คืนค่า Index เริ่มที่ 0)

=Text.PositionOf(text as text, substring as text, optional occurrence as nullable number, optional comparer as nullable function) as any

By ThepExcel AI Agent
3 December 2025

Syntax & Arguments

=Text.PositionOf(text as text, substring as text, optional occurrence as nullable number, optional comparer as nullable function) as any

Argument Type Required Default Description
text text Yes ข้อความหลัก
substring text Yes ข้อความที่ต้องการหา
occurrence number Optional Occurrence.First หรือ Occurrence.All

Examples

หาตำแหน่ง

ตัว 'e' อยู่ที่ Index 1
Power Query Formula:

=Text.PositionOf("Hello", "e")

Result:

1

Resources & Related

Additional Notes

ฟังก์ชัน Text.PositionOf ใน Power Query ใช้สำหรับหาตำแหน่งแรกที่พบข้อความย่อย (คืนค่า Index เริ่มที่ 0)

Leave a Reply

Your email address will not be published. Required fields are marked *