ตัวอย่างที่ 1: แสดง Path และชื่อไฟล์ของ Workbook
– สูตรจะคืนค่า Path เต็มของไฟล์ Excel และชื่อ Sheet ที่ใช้งานอยู่ (ต้องบันทึกไฟล์ก่อน)
=CELL("filename", MyWorkbook)
C:\Docs\[Book1.xlsx]Sheet1
ดูข้อมูลเซลล์ (Format/Type)
ข้อมูลเซลล์
=CELL(info_type, [reference])
=CELL(info_type, [reference])
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
| info_type | Text | Yes | ประเภทข้อมูล (เช่น “address”, “type”) | |
| reference | Reference | Yes | เซลล์ที่ต้องการดูข้อมูล |
=CELL("filename", MyWorkbook)
C:\Docs\[Book1.xlsx]Sheet1
=CELL("format", TargetCell)
G
=CELL("width", ColumnA)
8.43
ฟังก์ชัน CELL ใน Excel ช่วยส่งกลับข้อมูลเกี่ยวกับการจัดรูปแบบ ตำแหน่ง หรือเนื้อหาของเซลล์