Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to insert row and copy previous row + excel | Excel Discussion (Misc queries) | |||
Copy worksheet to new doc w/formulas not referencing previous doc | Excel Discussion (Misc queries) | |||
Need A Macro To Copy Previous Tab to New Tab | Excel Discussion (Misc queries) | |||
Macro to copy previous row and insert two blank rows | Excel Discussion (Misc queries) | |||
Copy Formatting of previous worksheet | Excel Discussion (Misc queries) |