Skip i'r prif gynnwys

Sut i gyfyngu i werthoedd pastio yn unig (atal fformatio) yn Excel?

Fel rheol, rydyn ni'n pastio data wedi'i gopïo gyda dim ond pwyso'r bysellau Ctrl + V ar yr un pryd. A bydd hynny'n gludo'r gwerthoedd a gopïwyd ynghyd â'r holl fformatio celloedd. Os oes angen i chi gludo'r gwerthoedd yn unig a chyfyngu ar fformatio'r celloedd, gall y dulliau canlynol eich helpu.

Cyfyngu i gludo gwerthoedd yn unig (atal fformatio) gyda nodwedd gwerthoedd past
Cyfyngu i gludo gwerthoedd yn unig (atal fformatio) gyda chod VBA
Cyfyngwch i gludo gwerthoedd yn unig gyda Kutools ar gyfer Excel


Cyfyngu i gludo gwerthoedd yn unig (atal fformatio) gyda nodwedd gwerthoedd past

Ffordd hawdd o gyfyngu i werthoedd pastio yn unig yw pasio'r data a gopïwyd fel gwerthoedd yn Excel yn unig.

1. Ar ôl copïo data, cliciwch ar y dde i'r gell gyrchfan y byddwch chi'n gludo'r data iddi.

2. Yna cliciwch y Gwerthoedd botwm o dan y Gludo Opsiynau adran yn y ddewislen clicio ar y dde. Gweler y screenshot:

Gallwch weld dim ond gwerthoedd celloedd wedi'u copïo sy'n cael eu pastio i'r celloedd cyrchfan.


Cyfyngu i gludo gwerthoedd yn unig (atal fformatio) gyda chod VBA

Mae'r cod VBA canlynol yn eich helpu i gludo gwerthoedd celloedd wedi'u copïo yn unig, a chyfyngu ar yr holl fformatio celloedd. Gwnewch fel a ganlyn.

1. Gwasgwch Alt + F11 allweddi ar yr un pryd i agor y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr.

2. Yn y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr, cliciwch ddwywaith ar y Llyfr Gwaith hwn yn y Prosiect cwarel iawn i agor y Llyfr Gwaith hwn ffenestr cod. Yna copïwch a gludwch y cod VBA isod i'r ffenestr.

Cod VBA: Cyfyngu i gludo gwerthoedd yn Excel yn unig

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. Gwasgwch y Alt + Q allweddi ar yr un pryd i gau ffenestr Microsoft Visual Basic for Applications.

Nawr, copïwch eich data, ac ewch i'r daflen waith cyrchfan. Dim ond un clic neu glicio ar y gell gyrchfan fydd yn pastio gwerthoedd celloedd wedi'u copïo heb unrhyw fformatio ar unwaith.


Cyfyngwch i gludo gwerthoedd yn unig gyda Kutools ar gyfer Excel

Kutools ar gyfer Excel's Copi Meysydd mae cyfleustodau yn eich helpu i gludo dim ond gwerthoedd amrediad dethol neu ystodau dethol lluosog yn Excel. Gwnewch fel a ganlyn.

Cyn gwneud cais Kutools ar gyfer Excel, os gwelwch yn dda ei lawrlwytho a'i osod yn gyntaf.

1. Dewiswch ystod neu ystodau lluosog gyda dal y Ctrl allwedd, yna cliciwch Kutools > Copi Meysydd

2. Yn y Copi Meysydd Lluosog blwch deialog, dim ond dewis y Gwerthoedd opsiwn yn y Gludo arbennig adran, ac yna cliciwch yr adran OK botwm.

Nodyn: Gallwch wirio'r ddau neu un o'r Gan gynnwys uchder rhes a Gan gynnwys lled colofn opsiynau yn ôl yr angen.

3. Yn y nesaf Copi Meysydd Lluosog blwch deialog, dewiswch gell wag ar gyfer pasio'r celloedd a gopïwyd, ac yna cliciwch ar y OK botwm.

Yna dim ond gwerthoedd yr holl gelloedd a ddewiswyd mewn ystod neu ystodau lluosog sy'n cael eu pastio.

  Os ydych chi am gael treial am ddim (30 diwrnod) o'r cyfleustodau hwn, cliciwch i'w lawrlwytho, ac yna ewch i gymhwyso'r llawdriniaeth yn ôl y camau uchod.


Erthyglau cysylltiedig:

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
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