Przejdź do głównej zawartości

Jak ustawić wartości wklejania jako domyślne wklejanie, gdy używasz Ctrl + V w programie Excel?

Zwykle w programie Excel po skopiowaniu danych z jednego zakresu lub arkusza roboczego i wklejeniu za pomocą Ctrl + V do innego formatowanie zostanie również domyślnie wklejone. Ale czasami po prostu chcesz wkleić jako wartości bez żadnego formatowania podczas wklejania danych. Tutaj mogę przedstawić prostą metodę ustawiania wartości wklejania tylko jako domyślnej wklejania, gdy używasz Ctrl + V w programie Excel.

Ustaw wartości wklejania jako domyślne wklejanie, gdy używasz Ctrl + V z kodem VBA


Ustaw wartości wklejania jako domyślne wklejanie, gdy używasz Ctrl + V z kodem VBA

Kiedy wklejasz dane jako same wartości, musisz kliknąć mały kwadrat w rogu swojego wyboru i za każdym razem po wklejeniu danych wybierać opcję Wartości. Poniższy kod VBA może pomóc w zmianie domyślnego wklejania w celu wklejenia wartości.

1. Przytrzymaj ALT + F11 klawisze, aby otworzyć Okno Microsoft Visual Basic for Applications.

2. Kliknij wstawka > Modułi wklej następujący kod w Moduł Okno.

Kod VBA: Ustaw wartości wklejania jako domyślne wklejanie, gdy używasz Ctrl + V

Sub PasteasValue()
Selection.PasteSpecial Paste:=xlPasteValues
End Sub

3. Następnie zapisz i zamknij kod i naciśnij Alt + F8 klawisze, aby otworzyć Macro okno dialogowe.

4, w Macro wybierz nazwę używanego makra PastyWartość a następnie kliknij Opcje przycisk, zobacz zrzut ekranu:

doc-wklej-wartości-domyślne-1

5. Następnie w Opcje makr okno dialogowe w obszarze Skrót proszę wpisać v zobacz zrzut ekranu:

doc-wklej-wartości-domyślne-2

6. A następnie kliknij OK zamknąć Opcje makr i kontynuuj zamykanie Macro dialog.

A teraz, kiedy wklejasz dane za pomocą Ctrl + V, dane zostaną domyślnie wklejone jako wartości.


Podobne artykuły:

Jak wkleić zawartość zewnętrzną do programu Excel zawsze zgodne z formatowaniem docelowym?


Demo: Ustaw wartości wklejania jako domyślne wklejanie podczas używania Ctrl + V w programie Excel

Kutools dla programu Excel: z ponad 300 poręcznymi dodatkami do programu Excel, które można wypróbować bez ograniczeń w ciągu 30 dni. Pobierz i bezpłatną wersję próbną teraz!

Najlepsze narzędzia biurowe

🤖 Pomocnik AI Kutools: Zrewolucjonizuj analizę danych w oparciu o: Inteligentne wykonanie   |  Wygeneruj kod  |  Twórz niestandardowe formuły  |  Analizuj dane i generuj wykresy  |  Wywołaj funkcje Kutools...
Popularne funkcje: Znajdź, wyróżnij lub zidentyfikuj duplikaty   |  Usuń puste wiersze   |  Łącz kolumny lub komórki bez utraty danych   |   Okrągły bez wzoru ...
Super wyszukiwanie: Wiele kryteriów VLookup    Wiele wartości VLookup  |   Przeglądanie pionowe na wielu arkuszach   |   Wyszukiwanie rozmyte ....
Zaawansowana lista rozwijana: Szybko twórz listę rozwijaną   |  Zależna lista rozwijana   |  Lista rozwijana wielokrotnego wyboru ....
Menedżer kolumn: Dodaj określoną liczbę kolumn  |  Przesuń kolumny  |  Przełącz stan widoczności ukrytych kolumn  |  Porównaj zakresy i kolumny ...
Polecane funkcje: Fokus siatki   |  Widok projektu   |   Duży pasek formuły    Menedżer skoroszytów i arkuszy   |  Biblioteka zasobów (Automatyczny tekst)   |  Selektor dat   |  Połącz arkusze   |  Szyfruj/odszyfruj komórki    Wysyłaj e-maile według listy   |  Super filtr   |   Specjalny filtr (filtruj pogrubienie/kursywa/przekreślenie...) ...
15 najlepszych zestawów narzędzi12 Tekst Tools (Dodaj tekst, Usuń znaki, ...)   |   50 + Wykres rodzaje (Wykres Gantta, ...)   |   40+ Praktyczne Wzory (Oblicz wiek na podstawie urodzin, ...)   |   19 Wprowadzenie Tools (Wstaw kod QR, Wstaw obraz ze ścieżki, ...)   |   12 Konwersja Tools (Liczby na słowa, Przeliczanie walut, ...)   |   7 Połącz i podziel Tools (Zaawansowane wiersze łączenia, Podział komórki, ...)   |   ... i więcej

Zwiększ swoje umiejętności Excela dzięki Kutools for Excel i doświadcz wydajności jak nigdy dotąd. Kutools dla programu Excel oferuje ponad 300 zaawansowanych funkcji zwiększających produktywność i oszczędzających czas.  Kliknij tutaj, aby uzyskać funkcję, której najbardziej potrzebujesz...

Opis


Karta Office wprowadza interfejs z zakładkami do pakietu Office i znacznie ułatwia pracę

  • Włącz edycję i czytanie na kartach w programach Word, Excel, PowerPoint, Publisher, Access, Visio i Project.
  • Otwieraj i twórz wiele dokumentów w nowych kartach tego samego okna, a nie w nowych oknach.
  • Zwiększa produktywność o 50% i redukuje setki kliknięć myszką każdego dnia!
Comments (24)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Saved module - called "module 2" but nothing shows up in macros - no 'PasteasValue'. Seems like a step is missing?
This comment was minimized by the moderator on the site
I want to learn if there is a way to work in a sheet, not in a module.

If not, is there a way to work in particular sheet I determine?
This comment was minimized by the moderator on the site
It is working but after pasting you cannot undo
This comment was minimized by the moderator on the site
Same here.
This comment was minimized by the moderator on the site
Hello, guys,
I am sorry, may be there is no other good way for solving this problem, if you have any other good ideas, please comment here.
Thank you!
This comment was minimized by the moderator on the site
Save as binary .xlsb,
Then you can use ctrl+z with macros.
This comment was minimized by the moderator on the site
what do you mean "save as binary. xlsb"?
This comment was minimized by the moderator on the site
I agree Graham, just tried this in Excel 2016. When I click the Run button in the Macro dialog, I get the error message:

Run-tme error '1004':
PasteSpecial method of Range class failed

which is a shame as this really would have helped me today. I also tried Dejvid's macro below, but nothing happened when pasting from one book to another.
This comment was minimized by the moderator on the site
Make sure you have something selected in copy mode. dont even bother entering his code
This comment was minimized by the moderator on the site
Unless I missed something (and the instructions are *very* good), this does not work in Excel 2016.
This comment was minimized by the moderator on the site
I use Microsoft office Standard 2016, at it works.
This comment was minimized by the moderator on the site
Thank You, Sir...
This comment was minimized by the moderator on the site
nice tip, but the macro should look like this, because the code above give you an error statement, if you push ctrl+v and you didn't previously select something with ctrl+c Sub PasteAsValues() On Error GoTo err_handler: Selection.PasteSpecial Paste:=xlPasteValues Exit Sub err_handler: End Sub
This comment was minimized by the moderator on the site
The solution from Mikael seems to nice replicate the 2013 solution offered by this page in a 2016-Excel-friendly way. Unfortunately, it also replicates the inability to undo (through Ctrl-Z or other "undo" actions) a paste action while this macro is enabled.
This comment was minimized by the moderator on the site
To get the undo function to work after you have use a macro is quite difficult unfortunately. Can't help you with that, sorry.
This comment was minimized by the moderator on the site
Hi, solution works great but control+z not working after pasting :( . any additional help?
This comment was minimized by the moderator on the site
This coding does not work with the latest version of Excel 2016. Running the script gives an error code for the line Paste:=xlPasteValues
This comment was minimized by the moderator on the site
Try using this code with Excel 2016: Sub Paste_Special() Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False End Sub
This comment was minimized by the moderator on the site
Excellent solution
this code should be written directly into the VBA command box not in module box and I selected its place to be in the workbook so you make sure to END every sub opened, and ignore any message that pops up
This comment was minimized by the moderator on the site
Thanks Mikael, but your code didn't work. Microsoft must have changed the VBA coding language too much in their last update. Even the text "Paste:=" results in a compiling error. If there's an answer out there, it must be in a different generation of Excel VBA.
This comment was minimized by the moderator on the site
The macro i sent is recorded in the latest version of MS Excel 2016, so maybe the problem lies within your installation? Besides that the sub I wrote won't work without the "Selection.PasteSpecial" part.
This comment was minimized by the moderator on the site
I just ran into the same problem.
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