Using VBA to Paste Values and Fonts Only

CV355

New Member
Joined
Dec 16, 2016
Messages
10
Hello all,

I am working on an application that requires me to paste a large range of data. I only want to paste the values and text format, leaving source borders and background colors as is. I have tried the various xlPaste______ options but none seem to handle this task.

Am I missing something?

One workaround that I'd prefer to avoid would be pasting all and using VBA to reformat the cells, but it seems excessive.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
It's not excessive if you paste values, then loop through and sync the fonts (2 steps). Or also change values while looping.
 
Last edited:
Upvote 0
You could reformat the range that you are pasting like this:
Code:
Sub Test()
    Columns("A").Font.Name = "Algerian"
End Sub
Replace the column with the pasted range and the font name with the name of the source range font.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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