ไปยังเนื้อหาหลัก

จะจำกัดความยาวของอักขระในเซลล์ Excel ได้อย่างไร

ผู้เขียน: เคลลี่ แก้ไขล่าสุด: 2023-12-13

เซลล์ใน Excel สามารถเก็บอักขระได้สูงสุด 32,767 ตัว โดยแสดงอักขระได้เพียง 1,024 ตัวและทั้งหมด 32,767 ตัวมองเห็นได้ในแถบสูตร อย่างไรก็ตาม บางครั้งคุณอาจต้องจำกัดการป้อนข้อมูลของผู้ใช้ไว้ที่จำนวนอักขระที่กำหนดในเซลล์ เช่น การจำกัดไว้ที่ 10 อักขระ บทช่วยสอนนี้จะแสดงวิธีจำกัดจำนวนอักขระในเซลล์ Excel อย่างมีประสิทธิภาพ


จำกัดจำนวนอักขระในเซลล์

ส่วนนี้ครอบคลุมถึงขั้นตอนในการจำกัดจำนวนอักขระที่สามารถป้อนลงในเซลล์หรือช่วงของเซลล์ที่ระบุได้

  1. เลือกช่วงเซลล์ที่คุณต้องการบังคับใช้ขีดจำกัดความยาวอักขระ
  2. คลิก การตรวจสอบข้อมูล ใน เครื่องมือข้อมูล กลุ่มภายใต้ ข้อมูล แถบ
  3. ตัว Vortex Indicator ได้ถูกนำเสนอลงในนิตยสาร การตรวจสอบข้อมูล กล่องโต้ตอบ โปรดตั้งกฎการตรวจสอบดังนี้:
    1. จาก อนุญาต: เมนูแบบเลื่อนลงเลือก ความยาวของข้อความ.
    2. จาก วันที่: แบบเลื่อนลง เลือกเกณฑ์ตามความต้องการของคุณ:
      1. เลือก เท่ากับ ตัวเลือกสำหรับการนับจำนวนอักขระที่แน่นอน เช่น 10 อักขระ
      2. เลือก น้อยกว่าหรือเท่ากับ สำหรับขีดจำกัดอักขระสูงสุด เช่น สูงสุด 10 อักขระ
      3. เลือกสำหรับ มากกว่า เกินกว่าจำนวนที่ระบุ เช่น มากกว่า 10 ตัวอักษร
    3. ตัว Vortex Indicator ได้ถูกนำเสนอลงในนิตยสาร สูงสุด/ขั้นต่ำ/ความยาว: ให้กรอกตัวเลขที่ต้องการสำหรับจำนวนอักขระสูงสุดตามความต้องการของคุณ
  4. คลิก OK.

ขณะนี้ ผู้ใช้จะถูกจำกัดให้ป้อนข้อความภายในขีดจำกัดอักขระที่กำหนดไว้ในเซลล์ที่เลือก

ป้องกันไม่ให้พิมพ์อักขระพิเศษตัวเลขหรือตัวอักษรในเซลล์ / ส่วนที่เลือกใน Excel

ด้วย Kutools for Excel's ป้องกันการพิมพ์ คุณสามารถจำกัดประเภทอักขระในเซลล์ Excel หรือส่วนที่เลือกได้อย่างง่ายดาย
A. บล็อกการป้อนอักขระพิเศษเช่น *, !ฯลฯ ;
B. จำกัดการพิมพ์อักขระเฉพาะ เช่น ตัวเลขหรือตัวอักษรบางตัว
C. อนุญาตให้พิมพ์เฉพาะอักขระที่ระบุ เช่น ตัวเลขหรือตัวอักษร ตามที่คุณต้องการ

ตั้งค่าข้อความเข้าเพื่อแจ้งจำนวนอักขระสูงสุด

ที่นี่ เราจะอธิบายวิธีตั้งค่าข้อความอินพุตที่แจ้งให้ผู้ใช้ทราบเกี่ยวกับข้อจำกัดของอักขระก่อนที่จะเริ่มพิมพ์ดังภาพด้านล่างนี้:

  1. เลือกเซลล์ที่คุณจะเพิ่มข้อความอินพุต
  2. คลิก การตรวจสอบข้อมูล ใน เครื่องมือข้อมูล กลุ่มภายใต้ ข้อมูล แถบ
  3. ตัว Vortex Indicator ได้ถูกนำเสนอลงในนิตยสาร การตรวจสอบข้อมูล กล่องโต้ตอบเลือกไฟล์ ข้อความที่ใส่ และทำดังนี้:
    1. ตรวจสอบ แสดงข้อความอินพุตเมื่อเลือกเซลล์ ตัวเลือก
    2. ป้อนชื่อข้อความและเนื้อหาข้อความ
  4. คลิก OK.

ตอนนี้ เมื่อคุณคลิกบนเซลล์ที่มีการกำหนดค่าข้อความที่ป้อน คำแนะนำเครื่องมือจะปรากฏขึ้น โดยแสดงชื่อข้อความและเนื้อหาที่คุณป้อนก่อนหน้านี้


เปิดใช้งานการแจ้งเตือนข้อผิดพลาดสำหรับการละเมิดขีดจำกัดอักขระ

ส่วนนี้จะแนะนำคุณตลอดการกำหนดค่าการแจ้งเตือนข้อผิดพลาดใน Excel ซึ่งออกแบบมาเพื่อแจ้งให้ผู้ใช้ทราบทันทีเมื่อข้อมูลที่ป้อนไม่ตรงตามขีดจำกัดอักขระที่ระบุ ดูภาพหน้าจอ:

  1. เลือกเซลล์ที่คุณต้องการเปิดใช้งานการแจ้งเตือนข้อผิดพลาดสำหรับอินสแตนซ์ของการป้อนข้อมูลที่ไม่ถูกต้อง
  2. คลิก การตรวจสอบข้อมูล ใน เครื่องมือข้อมูล กลุ่มภายใต้ ข้อมูล แถบ
  3. ตัว Vortex Indicator ได้ถูกนำเสนอลงในนิตยสาร การตรวจสอบข้อมูล กล่องโต้ตอบเลือกไฟล์ การแจ้งเตือนข้อผิดพลาด และทำดังนี้:
    1. ตรวจสอบ แสดงการแจ้งเตือนข้อผิดพลาดหลังจากป้อนข้อมูลที่ไม่ถูกต้อง ตัวเลือก
    2. เลือก การเตือน ตัวเลือกจาก Style: กล่องแบบหล่นลง
    3. ป้อนชื่อการแจ้งเตือนและข้อความแสดงข้อผิดพลาด
  4. คลิก OK.

จากนี้ไป หากข้อความที่ป้อนในเซลล์ไม่ถูกต้อง เช่น มีอักขระเกิน 10 ตัว กล่องโต้ตอบคำเตือนจะปรากฏขึ้น โดยแสดงชื่อและข้อความแจ้งเตือนที่กำหนดไว้ล่วงหน้า


การสาธิต: จำกัดความยาวของอักขระในเซลล์ด้วยข้อความอินพุตและคำเตือนการแจ้งเตือน


Kutools สำหรับ Excel: เครื่องมือแสนสะดวกกว่า 300 รายการอยู่แค่เพียงปลายนิ้วสัมผัส! เริ่มทดลองใช้ฟรี 30 วันโดยไม่มีข้อจำกัดด้านฟีเจอร์ตั้งแต่วันนี้ Download Now!

คลิกเพียงครั้งเดียวเพื่อป้องกันไม่ให้ป้อนข้อมูลที่ซ้ำกันในคอลัมน์ / รายการเดียว

Kutools สำหรับนวัตกรรมของ Excel ป้องกันการทำซ้ำ ยูทิลิตี้นี้ช่วยให้ผู้ใช้ Excel สะดวกในการป้องกันรายการที่ซ้ำกันในรายการหรือคอลัมน์ได้อย่างง่ายดาย ด้วยการคลิกเพียงครั้งเดียว เครื่องมืออันทรงพลังนี้รับประกันความสมบูรณ์และความถูกต้องของข้อมูลในสเปรดชีตของคุณ

บทความที่เกี่ยวข้อง:

วิธี จำกัด รายการค่าเซลล์ใน Excel

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (54)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you!
This comment was minimized by the moderator on the site
why date and number is allowed at text length?
This comment was minimized by the moderator on the site
Hi there, numbers are also characters. So if you set the max length less than 10 characters, as long as you don't input 10 or more number characters, you will be good.

Amanda
This comment was minimized by the moderator on the site
This is almost the exact solution I need but still need a bit more help. What I'm trying to achieve is to set a cell to have a max of 40 characters but not stop the user from entering all the data he needs, instead i would like anything over the 40 character limit to be populated in a second designated cell. Is this even a possibility? Thank you everyone in advance for any assistance provided.
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
I saw Tomas question about putting an exact limit of 10 spaces and your formula =A1&REPT(" ",10-LEN(A1)) however I need to take it a step further. I want to take three separate fields that I have set their spaces to exactly 10 and concatenate them with their "spaces" intact. Also, if I don't limit what they enter and they enter MORE than 10 characters in one of the cells I want to take ONLY the first 10. So as an example, I want to give them three cells they can enter information in. I don't want to limit what they input BUT, I want to concatenate these three fields and pick up 10 characters from each one. So if the first cell has 4 characters, in my concatenate formula I want it to pick up the 4 characters PLUS 6 spaces. If the second field has 20 characters, I want to only pick up the first 10 characters and the same thing for the third cell. We are trying to get to a uniform 30 characters of description but some names are longer or shorter than others. We want this to break evenly with 10 characters per cell. Hopefully this is making sense.
This comment was minimized by the moderator on the site
Hi, do you know how to put exact length limit 10 and when put abc i want from excel to put 8 space?
I want to set a cell to 10 character, when input 2 character then will auto fill up with 8 space after. if the cell is blank, then return with 10 space. this is for setting a excel file for user input and save as txt or cvs file for import to other software.
This comment was minimized by the moderator on the site
Hi Tomas,
You can use a formula to limit the text length: =A1 & REPT(" ",10-LEN(A1))
This comment was minimized by the moderator on the site
I want to limit the quantity of a cell depending on the category of another one,

For example if I input in A1 "Ok" in B1 must be limit to 10 characters
but if A1= "NG", B1 must be limit to 12 characters.
This comment was minimized by the moderator on the site
[quote]Hi, do you know how to put exact length limit 10 and when put abc i want from excel to put 8 space?By Ivan[/quote] I want to set a cell to 10 character, when input 2 character then will auto fill up with 8 space after. if the cell is blank, then return with 10 space. this is for setting a excel file for user input and save as txt or cvs file for import to other software
This comment was minimized by the moderator on the site
Hi, I have a attendance sheet. from 1 to 31. I put "P" on each cell if person is present. Now I want that how many times "P" is continuing present in cell. As as example - I have put "P" from 1 to 6 , then from 8th to 9th put P, and 10th is gap. then from 11th its continue to 18th. ... now i want how many times P is continue 6 time . PPPPPP PP PPPPPPPP Manually the answer is : 2(1to6 = 1,11to18=1) If you have any formula to count this it will be a great help.
This comment was minimized by the moderator on the site
=COUNTIF(B2:B17,">""") this formula will ignore empty cells but will count cells with data in i.e. P
This comment was minimized by the moderator on the site
Hi. I want out put txt file and no spaces between cell values. Like 3 cells with First Name, Middle and last. Entered Shawn G Goldman as SHAWNGGOLDMAN
This comment was minimized by the moderator on the site
Hi I want few things in a cell. I only want numbers in cell. I want to limit to 10 characters. I want to remove decimal like 15.00 to 1500. I want to indent to right. Also to add 0's to left to make it 10 characters .like 15.00 to 0000001500
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations