LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy a cell from a previous worksheet using a macro

Hi grateful for any help with the following:

I am trying to copy a cell from a previous worksheet to a current sheet
so that when the information in the previous sheet changes then the
relevant cell in the current sheet also chaneges. The following code
only copies the information when the macro is initially run and does
not alter if the copied cell information changes.

Sub Macro4()
'
' Macro4 Macro
' Macro recorded 31/01/2006 by McNaughton
'
' Keyboard Shortcut: Ctrl+n
'
Cells.Select
Selection.Copy
ActiveSheet.Next.Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=30
ActiveCell.Offset(32, 0).Range("A1:D54").Select
Application.CutCopyMode = False
Selection.ClearContents
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
ActiveCell.Offset(-31, 6).Range("A1:A85").Select
Selection.ClearContents
ActiveCell.Offset(0, -2).Range("A1").Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = ActiveSheet.Previous.Range("F86")
End Sub

The problem area is the last line of code befor EndSub.

Any help would be gratefully received.

Thanks

 
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
macro to insert row and copy previous row + excel Biffo Excel Discussion (Misc queries) 12 December 21st 09 09:21 PM
Copy worksheet to new doc w/formulas not referencing previous doc Feolet20 Excel Discussion (Misc queries) 4 June 30th 09 10:56 PM
Need A Macro To Copy Previous Tab to New Tab MGC Excel Discussion (Misc queries) 8 August 15th 07 04:18 AM
Macro to copy previous row and insert two blank rows dd Excel Discussion (Misc queries) 1 April 30th 07 11:25 PM
Copy Formatting of previous worksheet smoothjazz36 Excel Discussion (Misc queries) 3 February 26th 07 06:58 PM


All times are GMT +1. The time now is 06:11 PM.

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

About Us

"It's about Microsoft Excel"