แสดงบทความที่มีป้ายกำกับ การตัดข้อความ เอ็กเซล แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ การตัดข้อความ เอ็กเซล แสดงบทความทั้งหมด

ฟังก์ชั่นในการจัดการข้อความ (Text Function) ในโปรแกรม Excel


ในโปรแกรม Excel จะมีฟังก์ชั่น Text หลายตัวเพื่อให้คุณสามารถนำไปประยุกต์จัดการข้อความได้ตามสถานการณ์ต่าง ๆ ซึ่งในบทความนี้ ขอนำเสนอการใช้ LEN LEFT MID RIGHT TRIM FIND SEARCH ดังนี้

ฟังก์ชั่นในการนับตัวอักษรทั้งหมดในข้อความที่สนใจ (ในที่นี้ text)
ไวยากรณ์ =LEN(text)

ตัวอย่างที่ 1 ต้องการนับตัวอักษรในข้อความ สามารถเขียนได้ ดังนี้

=LEN("แสดงการนำตัวอักษรจากประโยคนี้")
ผลลัพธ์ คือ 29 ตัวอักษร


A1 = LEN Function returns the number of characters in a text string.
=LEN(A1)
ผลลัพธ์ คือ 63 ตัวอักษร


😁😁😁

ฟังก์ชั่นในการดึงตัวอักษรในข้อความ (text) โดยนับจากทางซ้ายของ Text ไปกี่ตัวอักษร (num_char) 
ไวยากรณ์ =LEFT(text, [num_chars])
หลักการ
  • Text (จำเป็น) คือ ข้อความที่ต้องการจะดึงมาแสดง
  • num_chars (ไม่จำเป็น) คือ จำนวนอักษรต้องการให้แสดง โดยเริ่มนับจากทางซ้ายของข้อความ
ตัวอย่างที่ 2 ต้องการดึงตัวอักษรจากทางซ้ายของข้อความ ดังนี้
A1 = LEFT function extracts a given number of characters from the left side of a supplied text string.
=LEFT(A1,14)
ผลลัพธ์ คือ LEFT function

😁😁😁

ฟังก์ชั่นในการดึงตัวอักษรในข้อความ (text) ซึ่งสามารถเริ่มดึงข้อความได้ตรงไหนของข้อความก็ได้ โดยระบุตำแหน่งที่ต้องการเริ่มให้ดึง (start_num) และ ต้องการดึงไปกี่ตัว (num_chars)
ไวยากรณ์ =MID(text,start_num,num_chars)
หลักการ
  • Text (จำเป็น) คือ ข้อความที่ต้องการจะตัด
  • start_num คือ จำนวนอักษรแรกที่ต้องการให้ตัด
  • num_char คือ จำนวนอักษรสุดท้ายที่ต้องการให้ตัด
ตัวอย่างที่ 3 ต้องการดึงตัวอักษรในข้อความจากตรงกลางไป 10 ตัวอักษร ดังนี้
A1 = MID function extracts a given number of characters from the middle of a supplied text string.
=MID (A1,42,10)
ผลลัพธ์ คือ characters


😁😁😁

ฟังก์ชั่นในการดึงตัวอักษรในข้อความ (text) โดยเริ่มต้นนับจากทางขวาของ Text ไปกี่ตัวอักษร (num_char)
ไวยากรณ์ =RIGHT(text, [num_chars])
ตัวอย่างที่ 4 ต้องการดึงตัวอักษรจากทางขวาของข้อความ ดังนี้
A1 = RIGHT function extracts a given number of characters from the right side of a supplied text string.
=RIGHT(A1,12)
ผลลัพธ์ คือ text string.


😁😁😁

ฟังก์ชั่นในการตัดช่องว่าง ที่อยู่ข้างหน้า และ ข้างหลังของข้อความที่กำหนดไว้ 
ไวยากรณ์ =TRIM(text)
ตัวอย่างที 5 ต้องการตัดช่องว่าง ดังนี้

=TRIM(" TRIM function ")
ผลลัพธ์ คือ TRIM function


😁😁😁

ฟังก์ชั่นในการค้นหาคำที่ต้องการ ว่าอยู่ในตำแหน่งอะไรของข้อความนั้น 
ไวยากรณ์   =FIND(find_text, within_text, [start_num])
หลักการ
  • find_text คือ คำที่คุณต้องการหา
  • within_text คือ คำนั้นต้องการหาจากที่ไหน
  • [start_num] (ไม่จำเป็น) คือ ตำแหน่งที่คุณต้องการเริ่มต้นหา
ตัวอย่างที 6 ต้องการค้นกาคำ ดังนี้
A1 = FIND function returns the position (as a number) of one text string inside another. 

=FIND("number",A1)
ผลลัพธ์ คือ 42

=FIND("returns","FIND function returns the position (as a number) of one text string inside another. ")
ผลลัพธ์ คือ 15

=FIND("FUNCTION",A1)
ผลลัพธ์ คือ #VALUE!


สังเกตของ Find Function

  • ฟังก์ชั่นนี้จะคืนค่าตำแหน่งตัวแรก ของคำที่คุณค้นหา (find_text)
  • ฟังก์ชั่นนี้จะคืนค่าตำแหน่งของคำที่คุณค้นหา (within_text)
  • ฟังก์ชั่นนี้จะแสดง #VALUE! เมื่อค้นหาคำ find_text ไม่พบใน within_text
  • ฟังก์ชั่นนี้จะสนใจตัวอักษรเล็ก-ใหญ่ ถ้าเป็นคำเดียวกันแต่ต่างกันที่ตัวอักษรเล็ก-ใหญ่ เมื่อไม่พบโปรแกรมจะแสดง #VALUE! 
แต่ถ้าไม่ต้องการให้โปรแกรม serious กับตัวอักษรเล็ก-ใหญ่ ต้องใช้ฟังก์ชั่นการค้นหาด้วย Search() 

😁😁😁

ฟังก์ชั่นที่ใช้สำหรับค้นหาคำที่ต้องการ ว่าอยู่ตำแหน่งที่เท่าไหร่ของข้อความที่ต้องการค้นหา โดยใช้การหาแบบ Wildcard 

ไวยากรณ์ =SEARCH(find_text, within_text, [start_num])

ตัวอย่างที่ 7 

A1 = SEARCH function returns the location of one text string inside another. SEARCH returns the position of the first character of find_text inside within_text. Unlike FIND, SEARCH allows wildcards, and is not case-sensitive.

=SEARCH("RETURNS",A1)
ผลลัพธ์ คือ 17

😁😁😁


Share:

จำนวนการดูหน้าเว็บรวม

Popular Posts

ขับเคลื่อนโดย Blogger.

Dashboards คืออะไร มีกี่ประเภท

Dashboards คืออะไร และสามารถช่วยเราในการทำงานอย่างไร Dashboards คือ การนำข้อมูลมาสร้างรายงานที่เป็นภาพรวมทางธุรกิจ ให้ผู้บริหารสามารถ...

Recent Posts

Keywords

เอ็กเซล Data-Management Functions การจัดการข้อมูลในเอ็กเซล Blogger Basic-Excel Create-Blogger การจัดการข้อมูล Excel Conditional Formatting excel Data-Analysis Drop down list Excel สูตร Computer knowledge Feed RSS Atom คือ อะไร Index Match function excel SEO Search Console Search engine chart excel คือ excel data validate paste option Excel vlookup approximate Match exact Match vlookup function excel การใช้ concatenate ใน excel สร้าง drop down list สร้าง กราฟ เอ็กเซล Advance Filter Auto Filter by Color Auto Filter by Text Content Syndication DATEDIF() Datedif Function Excel SUM Function Excel SUMIF Function Excel SUMIFS Function Formula Values Transpose Formatting Function excel Gantt Chart excel Gantt Chart excel ทำยังไง HLOOKUP Icon Set Index Match function คือ Knowledge Line Chart Scatter Chart LogicFunction Match function excel Name Manager Paste Special Pie Doughnut chart excel Robots Header Tag Sumproduct function การใช้ สูตร เอ็กเซล Template Text Function Excel Trim Clear Function Excel Values column chart excel condition countif excel count if excel 2010 countifs data validation excel countifs เงื่อนไข ตัวอักษร มากกว่า น้อยกว่า excel index match formula excel match function reference cell excel sort and filter excel เบืื้องต้น excel เบื้องต้น flash fill excel คือ flash fill คือ อะไร function คือ highlight in dropdownlist index excel match vlookup index match ใช้ยังไง lookup excel กราฟ แผนภูมิ Excel การ เรียง ข้อมูล excel การ เรียง ลําดับ ข้อมูล excel การกรองข้อมูล Excel การตัดข้อความ เอ็กเซล การทํา chart excel การทําcontrol chart excel การสร้าง ตาราง กราฟ excel การสร้าง chart excel การสร้างฟีต การหาผลรวมในเอ็กเซล การเผยแพร่เนื้ือหา การเพิ่ม Subscription ให้ Blogger การแยก ข้อความ การใช้ if การใช้ index match excel การใช้งาน Subtotal outline excel การใช้ฟังก์ชั่น concatenate การใช้แผนภูมิ chart excel ค้นหาข้อมูล เอ็กเซล ค้นหาเลขคอลัมน์ ค้นหาเลขแถว เอ็กเซล ตัดช่องวางในเอ็กเซล ผูกเว็บกับ Google Analytics ฟังก์ชั่น Text การใช้ วิธีการตัดข้อความใน Excel วิธีทำ แผนภูมิ วงกลม Excel สูตร COUNTIF สูตรexcel concatenate สูตรการหาผลรวมใน Excel หาผลต่างระหว่างเดือน เพิ่มรายการใน Data Validation แผนภูมิ คอลัมน์ excel แผนภูมิคอลัมน์ เรียงซ้อน ใส่สีให้ dropdownlist