Copy&Paste from another workbook to the first blank row and keep format

Anna_Llorens

New Member
Joined
Oct 5, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,
I want to copy and paste information from one workbook to the other, and I want this information to be copied in the first blank row, but I want to keep the formating and the formulas. I khew how to do it but only pasting values:

Sheets("Sheet1").Range("D23").Copy
Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues

Can anyone help me to paste not only values but as well formulas and formatting?
Thanks a lot!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi & welcome to MrExcel.
Try it on one line like
VBA Code:
Sheets("Sheet1").Range("D23").Copy Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1, 0)
 
Upvote 0
Hi & welcome to MrExcel.
Try it on one line like
VBA Code:
Sheets("Sheet1").Range("D23").Copy Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1, 0)
Thanks.
And for a different cell, how can I paste value and format? I tried "xlPasteValuesAndNumberFormats", but doesen't keep the background color, only the number format (Decimals, currency..)
 
Upvote 0
You will need to paste values & formats separately.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,467
Messages
6,124,985
Members
449,201
Latest member
Lunzwe73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top