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

วิธี จำกัด การวางค่าเท่านั้น (ป้องกันการจัดรูปแบบ) ใน Excel

โดยปกติเราวางข้อมูลที่คัดลอกเพียงแค่กดปุ่ม Ctrl + V พร้อมกัน และจะวางค่าที่คัดลอกพร้อมกับการจัดรูปแบบเซลล์ทั้งหมด หากคุณต้องการวางค่าเท่านั้นและ จำกัด การจัดรูปแบบเซลล์วิธีการต่อไปนี้สามารถช่วยคุณได้

จำกัด เฉพาะการวางค่าเท่านั้น (ป้องกันการจัดรูปแบบ) ด้วยคุณสมบัติวางค่า
จำกัด การวางค่าเท่านั้น (ป้องกันการจัดรูปแบบ) ด้วยรหัส VBA
จำกัด การวางค่าด้วย Kutools for Excel เท่านั้น


จำกัด เฉพาะการวางค่าเท่านั้น (ป้องกันการจัดรูปแบบ) ด้วยคุณสมบัติวางค่า

วิธีง่ายๆในการ จำกัด การวางค่าเท่านั้นคือการวางข้อมูลที่คัดลอกเป็นค่าใน Excel เท่านั้น

1. หลังจากคัดลอกข้อมูลแล้วให้คลิกขวาที่เซลล์ปลายทางที่คุณจะวางข้อมูลลงไป

2 จากนั้นคลิกปุ่ม ความคุ้มค่า ใต้ปุ่ม วางตัวเลือก ในเมนูคลิกขวา ดูภาพหน้าจอ:

คุณจะเห็นเฉพาะค่าของเซลล์ที่คัดลอกมาวางในเซลล์ปลายทาง


จำกัด การวางค่าเท่านั้น (ป้องกันการจัดรูปแบบ) ด้วยรหัส VBA

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

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

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

รหัส VBA: จำกัด การวางค่าใน Excel เท่านั้น

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    On Error Resume Next
    Target.PasteSpecial xlPasteValues
    Application.CutCopyMode = True
End Sub

3 กด อื่น ๆ + Q พร้อมกันเพื่อปิดหน้าต่าง Microsoft Visual Basic for Applications

ตอนนี้คัดลอกข้อมูลของคุณและไปที่แผ่นงานปลายทาง การคลิกเพียงครั้งเดียวหรือคลิกขวาที่เซลล์ปลายทางจะวางค่าของเซลล์ที่คัดลอกโดยไม่ต้องจัดรูปแบบทันที


จำกัด การวางค่าด้วย Kutools for Excel เท่านั้น

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

ก่อนที่จะใช้ Kutools สำหรับ Excelโปรด ดาวน์โหลดและติดตั้งในตอนแรก.

1. เลือกช่วงหรือหลายช่วงโดยกดปุ่ม Ctrl จากนั้นคลิก Kutools > ช่วงการคัดลอก

2 ใน คัดลอกหลายช่วง กล่องโต้ตอบเลือกเฉพาะไฟล์ ความคุ้มค่า ตัวเลือกใน วางแบบพิเศษ แล้วคลิกไฟล์ OK ปุ่ม

หมายเหตุ: คุณสามารถตรวจสอบทั้งสองหรือหนึ่งในไฟล์ รวมถึงความสูงของแถว และ รวมถึงความกว้างของคอลัมน์ ตัวเลือกตามที่คุณต้องการ

3. ในครั้งต่อไป คัดลอกหลายช่วง กล่องโต้ตอบเลือกเซลล์ว่างสำหรับวางเซลล์ที่คัดลอกแล้วคลิก OK ปุ่ม

จากนั้นจะวางเฉพาะค่าของเซลล์ที่เลือกทั้งหมดในช่วงหรือหลายช่วงเท่านั้น

  หากคุณต้องการทดลองใช้ยูทิลิตีนี้ฟรี (30 วัน) กรุณาคลิกเพื่อดาวน์โหลดแล้วไปใช้การดำเนินการตามขั้นตอนข้างต้น


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

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

🤖 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 (14)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello, there are a problem here, values are automatically paste when you click on the cell
This comment was minimized by the moderator on the site
Hi, any chance to add this feature only in some sheets?
This comment was minimized by the moderator on the site
Hallo,
ich habe eine Excel-Datei (100 Tabellenregister) für die ich eine Formel gesucht habe, die es erlaubt, beim Kopieren nur Werte einfügen, möglich zu machen.

Ausschneiden+Drag&Drop habe ich bereits per Makro ausgeschaltet. Ich habe jetzt im Netz folgenden Code gefunden, den ich in
"Diese Arbeitsmappe" geschrieben habe:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub

(Der Code verursacht, dass ich nach kopieren, den Inhalt sofort als Wert in eine angeklickte Zelle kopiert bekomme)
Das funktioniert sehr gut, jedoch habe ich noch ein Problem dabei:

Wenn ich Werte aus einer Zelle kopiere, kann ich diese auch in geschützte
Zellen kopieren und das soll nicht sein. In vielen geschützten Zellen stehen Formeln die nicht überschrieben werden sollen.

Kann mir jemand helfen, wie ich den Code erweitern oder ändern kann, dass er es nur erlaubt in nicht geschützte Zellen zu kopieren?

Gruß Heiko
This comment was minimized by the moderator on the site
Hi! for Kutools 'Copy Ranges', I realized there is limit on number of columns that can be copy at a time. I am working with 7,500 columns. I select 7,500 columns as the range, but it can only copy and paste partial of what I had selected, not all. I am planning to copy all these columns in one go and paste. Is there any way I can do that ? just to speed things up. Any help would highly be appreciated. Thanks!
This comment was minimized by the moderator on the site
Hi, is there code for working with ctrl+v. This code paste automatically when selecting cell. I found module code below link but couldn't find code for workbook like this.
https://www.extendoffice.com/documents/excel/2545-excel-set-paste-values-as-default.html
This comment was minimized by the moderator on the site
It's sad no one answers. I need this information too.
This comment was minimized by the moderator on the site
This code was great, but it was pasting items in the system clipboard that were copied from other programs. I put it in an 'If' statement which does nothing, unless Excel cells are actually in Cut or Copy mode. i.e. moving border around the cell(s).

Application.CutCopyMode has three modes: False = Not in Cut or Copy mode. | xlCopy = In Copy mode. | xlCut = In Cut mode.

'If in Cut or Copy mode, Paste Values Only
'If Not in Cut or Copy mode, skip and do nothing.

On Error Resume Next
If Not Application.CutCopyMode = False Then
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End If

This was a bit of a bugger for me to figure out. Hope it helps someone else.
-Travis (IT Professional since 1996)
This comment was minimized by the moderator on the site
This addition was a great help! Thank you so much for posting!
This comment was minimized by the moderator on the site
Hi Travis, Thank you very much for posting this.
I never respond to posts but i appreciate you posting this answer.
This comment was minimized by the moderator on the site
Hi Travis, is there code for working with ctrl+v. This code paste automatically when selecting cell. I found module code below link but couldn't find code for workbook like this. I hope what I have requested is possible.
https://www.extendoffice.com/documents/excel/2545-excel-set-paste-values-as-default.html
This comment was minimized by the moderator on the site
Dean, it is very useful! Thanks!
This comment was minimized by the moderator on the site
Thank you so much!! It works well and its so useful for the project that I am working on.
This comment was minimized by the moderator on the site
This works for me:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Target.PasteSpecial xlPasteValues
Application.CutCopyMode = True
End Sub
This comment was minimized by the moderator on the site
Would this work on Worksheet level only? I am trying to restrict this only on one worksheet (not entire workbook), but it seems there is a problem.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations