Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume you only have worksheets in the workbook and you want to process al
the current worksheets to a newly added sheet. Sub CopyData() Dim k as Long , j as Long, i as Long k = worksheets.count worksheets.add After:=worksheets(k) j = 1 for i = 1 to k worksheets(i).Range("B21:O25").copy _ worksheets(k).Cells(1,j) j = j + 5 Next End Sub -- Regards, Tom Ogilvy "bm4466" wrote: Hey, I have about 20 different sheets from which I need to select 5 rows out of the middle, about 15 columns long and put it into a new sheet...Anybody have any idea how to get this into VBA so I dont have to copy and paste it all, I also want to make sure that when I go to paste it into the new sheet, it makes sure that it comes to an empty box before it pastes, so that I dont lose any data. Any help appreciated. - Ben -- bm4466 ------------------------------------------------------------------------ bm4466's Profile: http://www.excelforum.com/member.php...o&userid=33949 View this thread: http://www.excelforum.com/showthread...hreadid=537244 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy paste special | Excel Discussion (Misc queries) | |||
Copy, Paste Special Value | Excel Discussion (Misc queries) | |||
Copy & paste special | Excel Worksheet Functions | |||
Copy/ Paste Special | Excel Programming | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming |