Перейти до основного матеріалу

Як встановити значення вставки як вставки за замовчуванням при використанні Ctrl + V в Excel?

Як правило, в Excel, коли ви копіюєте дані з одного діапазону або робочого аркуша та вставляєте Ctrl + V в інший, форматування також буде вставлено за замовчуванням. Але, іноді, ви просто хочете вставити як значення без будь-якого форматування, коли ви вставляєте дані. Тут я можу представити вам простий спосіб встановити значення вставки лише як пасту за замовчуванням, коли ви використовуєте Ctrl + V в Excel.

Встановіть значення вставки як пасту за замовчуванням, використовуючи Ctrl + V з кодом VBA


Встановіть значення вставки як пасту за замовчуванням, використовуючи Ctrl + V з кодом VBA

Коли ви вставляєте дані лише як значення, вам потрібно клацнути на маленькому квадратику в кутку вашого вибору та вибирати параметр Значення кожного разу після вставлення даних. Наступний код VBA може допомогти вам змінити вставку за замовчуванням на вставки значень.

1. Утримуйте клавішу ALT + F11 ключі, щоб відкрити Вікно Microsoft Visual Basic для програм.

2. Клацання Insert > Модуліта вставте наступний код у Модулі Вікно

Код VBA: встановіть значення вставки як пасту за замовчуванням, використовуючи Ctrl + V

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

3. Потім збережіть і закрийте код і натисніть Alt + F8 ключі, щоб відкрити Macro діалогове вікно.

4, в Macro діалогове вікно, виберіть використану назву макросу PasteasValue і натисніть кнопку Опції , див. знімок екрана:

doc-paste-values-default-1

5. Потім у Параметри макросу у діалоговому вікні під Гарячі клавіші розділ, будь ласка, введіть v , див. скріншот:

doc-paste-values-default-2

6. А потім клацніть OK закрити Параметри макросу і продовжуйте закривати Macro діалог

А тепер, коли ви вставляєте дані за допомогою Ctrl + V, дані будуть вставлені як значення за замовчуванням.


Пов'язана стаття:

Як вставити зовнішній вміст у Excel, завжди відповідаючи форматуванню призначення?


Демонстрація: встановіть значення вставки як пасту за замовчуванням, використовуючи Ctrl + V в Excel

Kutools для Excel: з більш ніж 300 зручними надбудовами Excel, спробуйте безкоштовно без обмежень протягом 30 днів. Завантажте та безкоштовно пробну версію зараз!

Найкращі інструменти продуктивності офісу

🤖 Kutools AI Aide: Революціонізуйте аналіз даних на основі: Інтелектуальне виконання   |  Згенерувати код  |  Створення спеціальних формул  |  Аналізуйте дані та створюйте діаграми  |  Викликати функції Kutools...
Популярні функції: Знайдіть, виділіть або визначте дублікати   |  Видалити порожні рядки   |  Об’єднайте стовпці або клітинки без втрати даних   |   Раунд без Формули ...
Супер пошук: VLookup за кількома критеріями    Багатозначний VLookup  |   VLookup на кількох аркушах   |   Нечіткий пошук ....
Розширений розкривний список: Швидке створення випадаючого списку   |  Залежний спадний список   |  Виберіть розкривний список, що вибирається ....
Менеджер колонок: Додайте конкретну кількість стовпців  |  Перемістити стовпці  |  Перемкнути статус видимості прихованих стовпців  |  Порівняйте діапазони та стовпці ...
Особливості: Фокус сітки   |  Перегляд дизайну   |   Велика панель формул    Диспетчер робочих книг і аркушів   |  Бібліотека ресурсів (автотекст)   |  Вибір дати   |  Об’єднайте робочі аркуші   |  Шифрування/розшифрування клітинок    Надсилайте листи за списком   |  Супер фільтр   |   Спеціальний фільтр (фільтр жирний/курсив/закреслений...) ...
Топ-15 наборів інструментів12 текст Tools (додати текст, Видалити символи, ...)   |   50 + Графік типи (діаграма Ганта, ...)   |   40+ Практичний Формули (Розрахуйте вік на основі дня народження, ...)   |   19 вставка Tools (Вставте QR-код, Вставити зображення зі шляху, ...)   |   12 Перетворення Tools (Числа до слів, Валютна конверсія, ...)   |   7 Злиття та розділення Tools (Розширені комбіновані ряди, Розділені клітини, ...)   |   ... і більше

Покращуйте свої навички Excel за допомогою Kutools для Excel і відчуйте ефективність, як ніколи раніше. Kutools для Excel пропонує понад 300 додаткових функцій для підвищення продуктивності та економії часу.  Натисніть тут, щоб отримати функцію, яка вам найбільше потрібна...

Опис


Вкладка Office Передає інтерфейс із вкладками в Office і значно полегшує вашу роботу

  • Увімкніть редагування та читання на вкладках у Word, Excel, PowerPoint, Publisher, Access, Visio та Project.
  • Відкривайте та створюйте кілька документів на нових вкладках того самого вікна, а не в нових вікнах.
  • Збільшує вашу продуктивність на 50% та зменшує сотні клацань миші для вас щодня!
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