How to copy cell contents AND formatting from one workbook to another?

uk_dave&gill

Board Regular
Joined
May 17, 2007
Messages
79
I have a workbook which I access and modify ("Staff Planner") which links to another workbook which others can only view ("Planner")

The contents of Planner change when Staff Planner is updated, through formulas like:-

='[Staff Planner.xls]Plan'!D1 (which sits in Cell D1 of Planner)

Problem is, the formatting doesn't copy. I need to copy the font colours from one workbook to the other, and the only way I can do this presently is by "Copy Format" tool.

Is there any way to do this automatically?
 
OK, I really have had a go at this, using VBA from other workbooks I have and LOTS of Googling!

Getting a bit stumped now though.

Decided I didn't want the whole of every sheet copied from one workbook to another (after I'd found a way to do this!) and that I'd rather do a range instead. Seems easy enough to copy from somewhere in the sheet to somewhere else, ie

Sub RangerCopy()
With ActiveSheet
.Range("A1:I19").Copy Destination:=Destination.Range("D23")

End With
End Sub

But I can't work out how to make another workbook the destination!

What I need is to copy the range A315:I1500 from "Staff Planner" to A1 in "Planner". Generally both workbooks will be open although if I could also get it to open them, do the copy, save both and close them, this would be a bonus!
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,215,523
Messages
6,125,315
Members
449,218
Latest member
Excel Master

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