excel - Copy multiple rows from many sheets to one sheet -


i receive workbook daily lists 50 rows of information per page on variable number of pages depending on how many rows there total.

how can copy 50 rows each page onto 1 master list?

from recording macro get

sub macro2()       sheets("page1_2").select     rows("5:54").select     selection.copy     sheets("page1_1").select     range("a56").select     activesheet.paste end sub 

but need loop through entire workbook. can't find way increment sheet selection 1 each iteration , paste range 50.

any help?

how about:

sub test()      dim currow integer     dim activeworksheet worksheet     set activeworksheet = activesheet     currow = 1     each ws in activeworkbook.worksheets         if not ws.name = activeworksheet.name             ws.range("5:54").copy destination:=activeworksheet.range(cstr(currow) & ":" & cstr(currow + 49))              currow = currow + 50         end if     next ws  end sub 

it loops on worksheets in workbook , copies contents current active sheet. looping excludes current active worksheet. assumes contents trying aggregate in rows 5 through 54.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -