---
title: COPILOT – ใช้ AI ประมวลผลและสร้างข้อความใน Excel
url: https://www.thepexcel.com/functions/excel/add-in-and-automation/copilot/
type: function-explainer
program: Excel
syntax: "=COPILOT(prompt_part1, [context1], [prompt_part2], [context2], ...)"
date: 2025-12-22
scores:
  popularity: 7
  difficulty: 6
  usefulness: 9
---

# COPILOT – ใช้ AI ประมวลผลและสร้างข้อความใน Excel

> COPILOT เป็นฟังก์ชันแรกใน Excel ที่ใช้ AI (GPT-4.1-mini) ประมวลผลข้อมูลและสร้างข้อความตามคำสั่งที่กำ

## คำอธิบาย

COPILOT เป็นฟังก์ชันแรกใน Excel ที่ใช้ AI (GPT-4.1-mini) ประมวลผลข้อมูลและสร้างข้อความตามคำสั่งที่กำหนด เหมาะสำหรับสรุปข้อมูล จัดหมวดหมู่ และสร้าง content อัตโนมัติ

## Syntax

```excel
=COPILOT(prompt_part1, [context1], [prompt_part2], [context2], ...)
```

## Arguments

| Name | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| prompt_part1 | Yes | Text |  | ข้อความที่อธิบายงานหรือคำถามที่ต้องการให้ AI ทำ เช่น "Summarize this feedback" หรือ "Classify this text" |
| context1 | No | Range/Cell |  | Reference ของเซลล์หรือ Range ที่ต้องการให้ AI ใช้เป็นข้อมูลประกอบ เช่น A1:A100 สำหรับข้อมูลที่ต้องการสรุป |
| prompt_part2 | No | Text |  | ข้อความเพิ่มเติมสำหรับ prompt ใช้สำหรับสร้าง prompt ที่ซับซ้อนมากขึ้น |
| context2 | No | Range/Cell |  | Reference ของเซลล์หรือ Range เพิ่มเติมสำหรับให้ข้อมูลประกอบมากขึ้น |

## ตัวอย่าง

### 1. จัดหมวดหมู่ feedback ลูกค้าอัตโนมัติ

```excel
=COPILOT("Classify this feedback as Positive, Negative, or Neutral:", A2)
```

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

สมมติ A2 = "สินค้าดีมาก ส่งเร็ว ประทับใจ" AI จะวิเคราะห์ข้อความและจัดหมวดหมู่ให้อัตโนมัติ ช่วยประหยัดเวลาจากการอ่านทีละรายการ

### 2. สรุปข้อมูลหลายแถว

```excel
=COPILOT("Summarize these customer feedbacks in 3 bullet points:", D4:D18)
```

**ผลลัพธ์:** `- Customers love fast delivery\n- Quality meets expectations\n- Some concerns about packaging`

ใช้ Range D4:D18 ที่มี feedback 15 รายการ AI จะอ่านทั้งหมดและสรุปเป็น 3 ประเด็นหลัก เหมาะสำหรับทำรายงานสรุป

### 3. สร้าง prompt แบบ dynamic ด้วยหลาย arguments

```excel
=COPILOT("Generate 5 product names for", B2, "in the category of", C2)
```

**ผลลัพธ์:** `1. AquaPure Pro\n2. ClearFlow Ultra\n3. PureWave Max\n4. FreshStream Elite\n5. HydroClean Plus`

สมมติ B2 = "water filter" และ C2 = "home appliances" ฟังก์ชันจะรวม prompt และ context สลับกันเพื่อสร้างคำสั่งที่สมบูรณ์ ช่วยให้ทำ prompt แบบ dynamic ได้

### 4. สร้างคำอธิบายสินค้าจากข้อมูลที่มี

```excel
=COPILOT("Write a 50-word product description for:", A2:C2)
```

**ผลลัพธ์:** `Introducing the EcoSmart Water Bottle...`

สมมติ A2:C2 มีข้อมูล Product Name, Features, และ Price ตามลำดับ AI จะนำข้อมูลทั้งหมดมาสร้างเป็น description ที่น่าสนใจ ลดเวลาเขียน content ได้มาก

### 5. ใช้เป็น Dynamic Array สร้างข้อมูลหลายแถว

```excel
=COPILOT("Generate a list of 10 fictional company names for a tech startup")
```

**ผลลัพธ์:** `NovaTech Solutions\nQuantum Dynamics...\n(และอีก 8 รายการ)`

เมื่อ AI สร้างผลลัพธ์หลายรายการ มันจะ spill ออกไปหลายเซลล์อัตโนมัติ (Dynamic Array) เหมาะสำหรับสร้างข้อมูลตัวอย่างหรือ mock data สำหรับทดสอบ

## หมายเหตุเพิ่มเติม

- ใช้สำหรับงานที่เป็นภาษา เช่น สรุป จัดหมวดหมู่ สร้างข้อความ ไม่ควรใช้แทนสูตรคำนวณตัวเลข เพราะสูตร Excel แม่นยำกว่า

- ระวังขีดจำกัด 100 ครั้ง/10 นาที ถ้าใช้ในตารางขนาดใหญ่ อาจถูก throttle และได้ #CONNECT error

- เขียน prompt ให้ชัดเจนและระบุ output format ที่ต้องการ เช่น "Reply with only one word: Positive, Negative, or Neutral" จะได้ผลลัพธ์ที่สม่ำเสมอขึ้น

- ถ้าต้องการผลลัพธ์คงที่ไม่เปลี่ยนแปลง ให้ Copy เซลล์แล้ว Paste as Values เพราะทุกครั้งที่ recalculate ผลอาจต่างกันเล็กน้อย

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

**Q: COPILOT ต่างจาก Copilot ใน Excel ที่ใช้ผ่าน side panel อย่างไร?**

COPILOT function ทำงานในเซลล์โดยตรง ผลลัพธ์เป็น formula ที่ recalculate ได้ ส่วน Copilot side panel เป็น chat interface ที่ช่วยเขียนสูตรหรือวิเคราะห์ข้อมูลแบบ interactive ครับ

**Q: ทำไมผลลัพธ์ไม่เหมือนกันทุกครั้งที่ recalculate?**

เพราะ AI เป็น non-deterministic ครับ เหมือนเวลาเราถามคำถามเดิมกับคน คำตอบอาจต่างกันเล็กน้อยแต่ละครั้ง ถ้าต้องการผลลัพธ์คงที่ให้ Copy แล้ว Paste as Values ครับ

**Q: COPILOT เข้าถึงข้อมูลอะไรบ้าง?**

COPILOT เข้าถึงได้เฉพาะข้อมูลที่คุณใส่ใน context arguments เท่านั้น ไม่สามารถเข้าถึงข้อมูลอื่นใน workbook, ระบบภายในองค์กร, หรือ internet ได้ และ Microsoft ยืนยันว่าข้อมูลจะไม่ถูกใช้ train AI model ครับ

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

- [Microsoft Support: COPILOT Function](https://support.microsoft.com/en-us/office/copilot-function-5849821b-755d-4030-a38b-9e20be0cbf62) _(official)_
- [Microsoft Learn: Copilot in Excel](https://learn.microsoft.com/en-us/copilot/copilot-for-excel) _(official)_

---

_Source: [https://www.thepexcel.com/functions/excel/add-in-and-automation/copilot/](https://www.thepexcel.com/functions/excel/add-in-and-automation/copilot/)_
