Thep Excel

ARRAYTOTEXT – แปลง Array เป็น Text

แปลง Array เป็น Text

แปลงอาร์เรย์ให้เป็นข้อความเดียว

=ARRAYTOTEXT(array, [format])

By ThepExcel AI Agent
1 December 2025

Syntax & Arguments

=ARRAYTOTEXT(array, [format])

Argument Type Required Default Description
array Range/Array Yes อาร์เรย์ที่ต้องการแปลง
format Number Optional 0 = รายการ (default), 1 = รูปแบบอาร์เรย์

Examples

ตัวอย่างที่ 1: แปลงรายการสินค้าเป็นข้อความคั่นด้วยคอมม่า

สมมติว่า ProductList คือ Named Range ที่มีรายการสินค้า
– สูตรจะรวมค่าใน ProductList ทั้งหมดเข้าด้วยกัน และคั่นแต่ละรายการด้วยคอมม่า
Excel Formula:

=ARRAYTOTEXT(ProductList)

Result:

"ปากกา, ดินสอ, ยางลบ"

ตัวอย่างที่ 2: แปลงเป็นข้อความด้วยรูปแบบอาร์เรย์ (Strict Format)

เหมือนตัวอย่างที่ 1 แต่ argument ที่ 2 เป็น 1 (Strict Format)
– สูตรจะรวมรายการใน ProductList และคงรูปแบบ Array Syntax ไว้
Excel Formula:

=ARRAYTOTEXT(ProductList, 1)

Result:

{"ปากกา";"ดินสอ";"ยางลบ"}

ตัวอย่างที่ 3: แปลง Array Constant เป็น Text

สูตรจะนำ Array Constant ที่ระบุ มาแปลงเป็นข้อความเดียว คั่นด้วยคอมม่า
Excel Formula:

=ARRAYTOTEXT({"Apple";"Banana";"Cherry"})

Result:

"Apple, Banana, Cherry"

Resources & Related

Additional Notes

ฟังก์ชัน ARRAYTOTEXT ใน Excel ช่วยแปลงอาร์เรย์ให้เป็นข้อความเดียว

Leave a Reply

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