Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Afternoon,
I have a file with 10 different sheets in it. I have a macro part of which is attached below, which copies the format from a set of cells in sheet 1 and copies them into sheet 2. I need to do this for all 10 sheets - take the format thats in cells cells P10 to A109 from sheets 1 and copy it to sheet 2, then sheet 3, sheet 4 etc etc. All copying is from sheet 1. Is it possible to have one formula that will loop through the sheets without me having to repeat the same code 10 times? Thanks Sheets("1").Range("P10:AA109").Copy Sheets("2").Range("P10").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False Next code would be (exactly the same apart from sheet ref in second line Sheets("1").Range("P10:AA109").Copy Sheets("3").Range("P10").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy dynamic range | Excel Programming | |||
Macro to copy a certain a cell to a dynamic range | Excel Programming | |||
copy a dynamic column range in macro? | Excel Programming | |||
Copy via code from a dynamic range using offeset | Excel Programming | |||
Dynamic range copy. | Excel Programming |