View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman[_2_] Mike Fogleman[_2_] is offline
external usenet poster
 
Posts: 206
Default Code to Copy a Formula to Multiple Sheets Q

This will use the Clipboard so it need only copy once and then loop\paste
through the sheets.

Sub CopyStart2End()
Dim i As Integer, sNDX As Integer, eNDX As Integer

sNDX = Worksheets("Start").Index + 1 'after Start
eNDX = Worksheets("End").Index - 1 'before End
'if there are always 52 sheets between Start & End
'then use the next 4 lines to check that there are
' If eNDX - sNDX < 51 Then
' MsgBox ("A sheet is missing")
' Exit Sub
' End If
Worksheets("02-11-08").Range("L36").Copy
For i = sNDX To eNDX
With Worksheets(i)
.Activate
.Paste .Range("L36")
End With
Next
Application.CutCopyMode = False
End Sub


Mike F
"Seanie" wrote in message
...
What code could I use to copy a particular formula & format from one
cell to the same cell in all sheets between 2 specific ones? This
would allow a short-cut for me inside of copying it manually 52 times

My Formula which I want to use is in sheet 02-11-08 - Cell L36
The 2 sheets between which I want to copy the above formual is "Start"
& "End" - thus every sheet between these should have the formula and
not these two

Thanks