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

วิธีแทรกความคิดเห็นไปยังหลายเซลล์ใน Excel อย่างรวดเร็ว

ในเวิร์กชีตการแทรกข้อคิดเห็นในเซลล์ทำได้ง่ายมาก แต่เมื่อคุณต้องการแทรกข้อคิดเห็นเดียวกันลงในหลายเซลล์พร้อมกันคุณจะทำอย่างไร

แทรกข้อคิดเห็นลงในเซลล์หลายเซลล์ด้วยคุณสมบัติการวางแบบพิเศษ
แทรกข้อคิดเห็นไปยังหลายเซลล์ด้วยรหัส VBA


แทรกข้อคิดเห็นลงในเซลล์หลายเซลล์ด้วยคุณสมบัติการวางแบบพิเศษ

ใน Excel ไม่มีวิธีแทรกความคิดเห็นหลายรายการในเวลาเดียวกัน อย่างไรก็ตามคุณสามารถคัดลอกความคิดเห็นไปยังเซลล์ต่างๆได้ดังนี้:

1. แทรกความคิดเห็นของคุณในเซลล์

2. เลือกเซลล์ข้อคิดเห็นแล้วกดปุ่ม Ctrl + C คีย์เพื่อคัดลอก

3. จากนั้นเลือกและคลิกขวาที่ช่วงที่คุณต้องการใส่ความคิดเห็นเป็นชุดเลือก  วางแบบพิเศษ > วางแบบพิเศษ จากเมนูคลิกขวา ดูภาพหน้าจอ:

4 ใน วางแบบพิเศษ ให้ทำเครื่องหมายที่ ความคิดเห็น จากนั้นคลิกตัวเลือก OK ปุ่ม. ดูภาพหน้าจอ:

จากนั้นความคิดเห็นเดียวกันจะถูกแทรกไปยังเซลล์ที่เลือกทั้งหมดทันที

หมายเหตุ: วิธีนี้จะแทรกความคิดเห็นเดียวกันกับเซลล์ที่เลือกทั้งหมด หากคุณต้องการแทรกความคิดเห็นเดียวกันไปยังเซลล์ที่มองเห็นได้เฉพาะของรายการที่กรองเท่านั้นโปรดลองใช้วิธี VBA ด้านล่าง


แทรกข้อคิดเห็นไปยังหลายเซลล์ด้วยรหัส VBA

สมมติว่าคุณมีรายการกรองตามภาพด้านล่างที่แสดง และคุณแค่ต้องการเพิ่มความคิดเห็นเป็นกลุ่มให้กับเซลล์ที่มองเห็นได้ทั้งหมด กรุณาดำเนินการดังนี้

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

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

VBA: แบตช์ความคิดเห็นเฉื่อยไปยังหลายเซลล์ (เซลล์ที่มองเห็นได้เฉพาะในรายการที่กรองแล้ว)

Sub InsertCommentsSelection()
    Dim xRg As Range
    Dim xRgEach As Range
    Dim xAddress As String
    Dim xText As String
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Please select a range:", "Kutools For Excel", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    If xRg.Count > 1 Then
        Set xRg = xRg.SpecialCells(xlCellTypeVisible)
    End If
    xRg.Select
    xText = InputBox("Enter Comment to Add" & vbCrLf & "Comment will be added to all cells in Selection: ", "Kutools For Excel")
    If xText = "" Then
        MsgBox "No comment added", vbInformation, "Kutools For Excel"
        Exit Sub
    End If
    For Each xRgEach In xRg
        With xRgEach
        .ClearComments
        .AddComment
        .Comment.Text Text:=xText
        End With
    Next xRgEach
End Sub

3 กด F5 กุญแจสำคัญในการเรียกใช้รหัส ในครั้งแรกที่โผล่ขึ้นมา Kutools สำหรับ Excel โปรดเลือกช่วงที่กรองแล้วที่คุณต้องการเพิ่มความคิดเห็นจากนั้นคลิกที่ OK ปุ่ม. ดูภาพหน้าจอ:

4. แล้วอีกอย่าง Kutools สำหรับ Excel กล่องโต้ตอบปรากฏขึ้นโปรดป้อนความคิดเห็นของคุณลงในกล่องข้อความจากนั้นคลิกที่ OK ปุ่ม

ตอนนี้ความคิดเห็นจะถูกแทรกไปยังเซลล์ที่มองเห็นได้ทั้งหมดในรายการกรองที่เลือกเท่านั้นตามภาพด้านล่างที่แสดง:


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

🤖 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 (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
how do you make it ignores none merged cells and just add notes to only the merged cells selected?
This comment was minimized by the moderator on the site
Hello, iresolver
To solve your problem, please apply the below code:
Sub InsertCommentsSelection()
    Dim xRg As Range
    Dim xRgEach As Range
    Dim xAddress As String
    Dim xText As String
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xRg = Application.InputBox("Please select a range:", "Kutools For Excel", xAddress, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    If xRg.Count > 1 Then
        Set xRg = xRg.SpecialCells(xlCellTypeVisible)
    End If
    xRg.Select
    xText = InputBox("Enter Comment to Add" & vbCrLf & "Comment will be added to all cells in Selection: ", "Kutools For Excel")
    If xText = "" Then
        MsgBox "No comment added", vbInformation, "Kutools For Excel"
        Exit Sub
    End If
    For Each xRgEach In xRg
        If xRgEach.MergeCells Then
            With xRgEach
            .ClearComments
            .AddComment
            .Comment.Text Text:=xText
            End With
        End If
    Next xRgEach
End Sub


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Excelente, gracias
This comment was minimized by the moderator on the site
Excelente aporte, gracias por el dato !!!!
This comment was minimized by the moderator on the site
Can anyone help me in VBA Code,
I want that I do multiple comments and have option to add picture in each cell without doing formatting again and again.
and then picture of that cell will save in folder of excel file with same cell name.
I will be thankful to you if anyone helps me in this
This comment was minimized by the moderator on the site
this is really very informative post ..


thanks for the awesome post
digifloor
This comment was minimized by the moderator on the site
for filtered cell it is not working
This comment was minimized by the moderator on the site
Dear me,
The VBA code is now updated. It supports batch insert comment to not only normal range, but also visible cells only in a filtered list.
Thank you for your comment!
This comment was minimized by the moderator on the site
if the sheet in excel is in filter will this apply for only filtered cells????
This comment was minimized by the moderator on the site
[quote]I researed valuable information on this point as I am working on a class project. Thank you posting useful information and its now becoming easier to accomplish this task. font converter online
This comment was minimized by the moderator on the site
That's really helpful. thanks.
This comment was minimized by the moderator on the site
This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog. Yong http://www.gofastek.com
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