Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey all, I have a workbook which contains many worksheets the first of which i always called '01' and the last which is always called 'Reference'. I also have a second workboo called 'Test'. What I need is a macro that scrolls through all the sheets in the firs book and copies the data from the last row to paste into a s sheet in Test so all thes rows can be added together. I have this (which doesn't work): Sub NewQCM55() Dim owksheet As Worksheet For Each owksheet In Worksheet Range("A8").Select Selection.End(xlDown).Select Range(Selection, Selection.End(xlToRight)).Select Selection.Copy Windows("test.xls").Activate Sheets("New_Jersey").Select Range("B1").Select ActiveSheet.Paste Rows("1:1").Select Selection.Insert Shift:=xlDown Windows("New_jersey_agent.xls").Activate Next owksheet End Sub But my main issue is that I can't get the macro to move past the firs sheet it is copying data from, I know I can do this in a For loop but I would really aprieciate pointer in the right direction. Cheers -- Hru4 ----------------------------------------------------------------------- Hru48's Profile: http://www.excelforum.com/member.php...fo&userid=2489 View this thread: http://www.excelforum.com/showthread.php?threadid=55400 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Worksheet Functions | |||
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? | Excel Programming | |||
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? | Excel Programming | |||
Allocate Files to Sheets and Build a Master Sheet which Summarises All Sheets | Excel Programming |