Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Code to Copy a Formula to Multiple Sheets Q

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Code to Copy a Formula to Multiple Sheets Q

Mike, thats fantastic

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on VBA Code to populate multiple sheets [email protected] Excel Discussion (Misc queries) 1 January 15th 08 04:40 AM
Code Procedure for multiple sheets AMY Z. Excel Programming 2 August 17th 07 10:54 PM
Copy date formula to multiple sheets John Excel Discussion (Misc queries) 2 November 22nd 06 10:36 PM
Copy from Multiple Sheets Eric[_23_] Excel Programming 3 August 5th 04 07:00 PM
copy and paste from different sheets into one sheet using a VB code reena Excel Programming 2 August 5th 03 02:49 PM


All times are GMT +1. The time now is 07:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"