copy data & format to mutiple sheets

  • Thread starter Thread starter rvik
  • Start date Start date
R

rvik

hi

i have a format in a sheet. i want to copy the format to all the othe
sheets in the workbook. i want a macro for this.

yes, i could select all the sheets and paste...but the sheet names kee
varying daily....

thanks a lot in advanc
 
AS requested

Sub CopyFormats()
Dim sOriginal
Dim sh As Worksheet

sOriginal = ActiveSheet.Name
Cells.Copy
For Each sh In Worksheets
If sh.Name <> sOriginal Then
sh.Cells.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End If
Next sh

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
bob,

i am a bit novice on the vba coding.what do i do with the code?

sorry, if i am troubling a lot......but .....

can u pls guide me?
 
bob,

i got it running..

but i want to copy only the format in a range of cells to the sheets in
the workbook..

the code copies the entire worsheet format into the other sheets. ALso
the data within then range is also to be copied.

i have got a table with headers, and formulas like sum, count

thanks
 
What range do you want to copy, and do you want it to the same place on
other sheets(e.g. G10:L55 ->G10:L55), or somewhere else (e.g.
G10:L55->A1:F46)?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top