vba merge multiple sheets into master workbook, copy , paste values & source FONT formatting

powercell99

Board Regular
Joined
May 14, 2014
Messages
75
Morning,

I am trying to merge several worksheets from different workbooks into a master workbook. Because the users of the source workbooks aren't particularly skilled at excel, I like to use the paste values method to avoid copying unintended data into the master (like external links, named ranges, etc). But a couple of the source workbooks prefer to use the strike-through font format to identify changes/deletions they have made to their workbook. When that data is then copied and pasted as values into the master workbook the strike-through font formatting is not copied, so we cannot tell that it was something that was intended to be displayed as something that was deleted. Is there a way to copy and paste values but keep the Font Strike-through formatting from the source? Or would i have to Paste All and worry about cleaning up any external links and named ranges etc. a different way??

HTML:
    DataSheet1.Range("A2:X" & LastRowDataSheet1&).Copy    OutSheet1.Range("A" & LastRowOutSheet1&).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=True, Transpose:=False    Application.CutCopyMode = False

Any suggestions would be greatly appreciated. Have you encountered this before??

larry
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
With PasteSpecial you can specify one or more of the required PasteTypes needed.

e.g.

Code:
DataSheet1.Range("A2:X" & LastRowDataSheet1).Copy
 
    With OutSheet1.Range("A" & LastRowOutSheet1)
           .PasteSpecial Paste:=xlPasteValues
           .PasteSpecial Paste:=xlPasteFormats
           .PasteSpecial Paste:=xlPasteColumnWidths
    End With
    
    Application.CutCopyMode = False

You will need to adjust to meet specific project need - More info in your VBA helpfile

Dave
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

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