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

วิธีเพิ่มตัวอักษรทีละตัวโดยอัตโนมัติเพื่อรับตัวอักษรถัดไปใน Excel

สมมติว่าคุณมีเซลล์ที่มีตัวอักษร AB คุณต้องเพิ่มตัวอักษรตัวสุดท้ายทีละตัวเพื่อให้ได้ตัวอักษร AC, AD ... และอื่น ๆ หรือคุณมีตัวอักษร A และต้องการเพิ่มตัวอักษรเป็น B, C ... เพื่อสร้างรายการจดหมาย จะบรรลุได้อย่างไร? บทความนี้สามารถช่วยคุณในรายละเอียด

เพิ่มตัวอักษร AB ทีละตัวเพื่อรับ AC, AD ... พร้อมสูตร
เพิ่มตัวอักษรทีละตัวเพื่อรับรายการตัวอักษรพร้อมสูตร
เพิ่มตัวอักษรทีละตัวเพื่อรับรายชื่อตัวอักษรด้วยฟังก์ชันที่ผู้ใช้กำหนด


เพิ่มตัวอักษร AB ทีละตัวเพื่อรับ AC, AD ... พร้อมสูตร

โปรดทำดังนี้เพื่อเพิ่มตัวอักษรทีละตัวใน Excel

1. เลือกเซลล์ว่างด้านล่างตัวอักษรที่กำหนดจากนั้นป้อนสูตรด้านล่างลงไปจากนั้นกดปุ่ม เข้าสู่ กุญแจ 

=IF(RIGHT($A2,1)="Z", CHAR(CODE(LEFT(A2,1))+1),LEFT(A2,1))&CHAR(65+MOD(CODE(RIGHT(A2,1))+1-65,26))

หมายเหตุ: ในสูตร A2 คือเซลล์ที่มีตัวอักษรที่กำหนด

2. เลือก A3 ต่อไปลาก Fill Handle ลงเพื่อรับรายการตัวอักษรที่คุณต้องการ


เพิ่มตัวอักษร A ทีละตัวเพื่อรับรายการตัวอักษรพร้อมสูตร

คุณสามารถใช้ = CHAR (รหัส (A1) +1) สูตรเพิ่มตัวอักษรทีละตัวใน Excel กรุณาดำเนินการดังนี้

1. เลือกเซลล์ว่างด้านล่างตัวอักษรที่กำหนดให้ป้อนสูตร = CHAR (รหัส (A2) +1) ลงในแถบสูตรแล้วกดปุ่ม เข้าสู่ สำคัญ. ดูภาพหน้าจอ:

2. เลือกเซลล์ผลลัพธ์ลาก Fill Handle ลงเพื่อรับตัวอักษรที่คุณต้องการ

หมายเหตุ: ด้วยสูตรนี้หลังจากได้ตัวอักษร Z แล้วหากคุณลาก Fill Handle ลงไปเรื่อย ๆ คุณจะได้รับอักขระพิเศษตามภาพด้านล่างที่แสดง หากคุณต้องการได้ตัวอักษร AA หลัง Z ฟังก์ชันที่ผู้ใช้กำหนดต่อไปนี้สามารถช่วยคุณได้


เพิ่มตัวอักษรทีละตัวเพื่อรับรายชื่อตัวอักษรด้วยฟังก์ชันที่ผู้ใช้กำหนด

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

1 กด อื่น ๆ + F11 พร้อมกันเพื่อเปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

2 ใน Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่างคลิก สิ่งที่ใส่เข้าไป > โมดูล. จากนั้นคัดลอกและวางโค้ด VBA ด้านล่างลงในไฟล์ โมดูล หน้าต่าง

รหัส VBA: เพิ่มตัวอักษรทีละตัวเพื่อรับรายชื่อตัวอักษร

Function ColLtrs(i As Long) As String
    ColLtrs = Replace(Cells(1, i).Address(False, False), "1", "")
End Function

3 กด อื่น ๆ + Q ปุ่มเพื่อปิดไฟล์ Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

4. เลือกเซลล์ว่างด้านล่างตัวอักษรที่กำหนดให้ป้อนสูตร = ColLtrs (ROW ())แล้วกดปุ่ม เข้าสู่ กุญแจสำคัญในการรับตัวอักษรตัวที่สอง

2. เลือกเซลล์ผลลัพธ์ลาก Fill Handle ลงเพื่อรับตัวอักษรที่คุณต้องการ

หมายเหตุ: ด้วยวิธีนี้ตัวอักษรที่คุณเพิ่มขึ้นจะขึ้นอยู่กับหมายเลขแถว คุณต้องเริ่มตัวอักษร A ตัวแรกในแถวแรกของแผ่นงานมิฉะนั้นตัวอักษรจะไม่เป็นระเบียบ

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

🤖 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 (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
is there any formula to increase or write ascending order like 1nc1, 1nc2, 1nc3.....
This comment was minimized by the moderator on the site
Hi,

To create an incrementing sequence like "1nc1", "1nc2", "1nc3", etc., in Excel, you can use a formula that leverages the row number to generate the numeric part of the sequence.

Assuming you want to start this sequence in cell A1, you would enter the following formula in A1:
="1nc" & ROW(A1)
Then, drag this formula down to the desired number of rows. Each cell will generate a part of the sequence based on its row number. For example, cell A2 will display “1nc2”, A3 will display “1nc3”, and so on.

The logic behind this formula is:
ROW(A1) returns the row number of cell A1, which is 1.
"1nc" & ROW(A1) concatenates the string “1nc” with the row number, creating “1nc1”.
This comment was minimized by the moderator on the site
I need a code to help make my rows from 1-A to 1-Z please
This comment was minimized by the moderator on the site
Hi Mayra Lopez,
The VBA code provided in the post is still helpful, but you need to apply the following formula to get the results you need:
="1-"&ColLtrs(ROW())
This comment was minimized by the moderator on the site
How would I create a formula that advances like this?:

AAAAAAAAA
AAAAAAAAB
AAAAAAAAC
AAAAAAAAD
etc.
This comment was minimized by the moderator on the site
Hi Willie B,
You can try the VBA code provided in the post. After adding the code, use this formula to get the result you need:
="AAAAAAAA"&ColLtrs(ROW())
This comment was minimized by the moderator on the site
I need a code for increasing my row cell values from AA-01-A01, AA-01-A02 to AA-01-B01, AA-01-B02. And I also need a code for my colomn cell values from AA-01-A01, AA-01-A02 to AA-03-A01, A-03-A02. Help.
This comment was minimized by the moderator on the site
I need a code from A-Z, AA-ZZ, AAA to ZZZ, AAAA to ZZZZ
This comment was minimized by the moderator on the site
Hi,Sorry can't help with this problem. You can post the problem to the forum below to get help from other Excel enthusiasts.
https://www.extendoffice.com/forum/kutools-for-excel.html 
This comment was minimized by the moderator on the site
How do I get it to start over at A when Z is used?
This comment was minimized by the moderator on the site
This code will allow you to go from A to ZZ.

=IF(B2="Z","AA",IF(LEN(B2)=1,CHAR(CODE(B2)+1),IF(RIGHT(B2,1)="Z",CHAR(CODE(LEFT(B2,1))+1),LEFT(B2,1))&CHAR(65+MOD(CODE(RIGHT(B2,1))+1-65,26))))
This comment was minimized by the moderator on the site
Thank you Zac for the letter sequence formula, saved me a ton load of work
This comment was minimized by the moderator on the site
Is there a way to do this for entire words? Where every letter in the word moves up by X number of characters
This comment was minimized by the moderator on the site
Excel was the spreadsheet that superseded Lotus 1-2-3, and having been around that long, you would think that geniuses at Microsoft would have created a more simple means of retrieving a cells column number, without having to write your own function. Back in 2001, 2002 when I was programming in VBA there were only 65536 rows in an Excel spreadsheet, now the number has increased to a ridiculous 1.4 million rows. It's not how big the database is that counts, but how intelligent you manage the data on your hard drive, when accessing that data through Excel.

If that doesn't make you upset, then the Bankers Rounding scheme used by Excel should finish the job! We were taught math in school, basic rounding, come to find out, the Bankers "guild" wants to determine how cash amounts are rounded to better cater to their advantages. For instance, 1.5 is either closer to 1 or 2, but is rounded up to 2, being the even number. 0.5 is either closer to 0 or 1, but being the odd number, they round it down to 0. The entire system is corrupt, and they create the business software used by American businesses.



I read a comment below the one I'm addressing, and someone basically said, "I have a lot of banker friends, and they never heard of Bankers Rounding; They say they used a method called "5 Step Rounding" in the EU. So does that mean the Bankers Rounding is used only in the sabotage of the American Economy, but not good enough to ruin the European Economy that's trying to take over the world?! These money changers never cease to amaze me at how far they will go in their arrogance!
This comment was minimized by the moderator on the site
Everything man does is corrupt. Everything.
This comment was minimized by the moderator on the site
Dear Sir
When I run the function =ColLtrs(ROW()) in an excel sheet, I get perfect results, but if I want to call this function or cell value in VBA, then is it possible. So my variable could be i with values 1,2,3,4,....27,28, etc and result should be A,B,C,D....,AA,AB and so on. Is it possible?
Thanks
This comment was minimized by the moderator on the site
Hi,
Please select the number cells and run the below code to solve the problem.

Sub NumTOAZ()
Dim xRg As Range
Dim xStr As String
On Error Resume Next
For Each xRg In Selection
xStr = Replace(Cells(1, xRg.Value).Address(False, False), "1", "")
xRg.Value = xStr
Next
End Sub
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