VBA copying multiple rows in Excel sequence and pasting to different excel sheet -


i found info on forum haven't been able understand it. need copy specific rows (range) in sequence 1 excel sheet new sheet data plotting. can please me visual basic code?

my data looks this: http://imgur.com/1vm12xd

what need combine a1-1:e1-1 , a1-2:e1-2 data side side, in want d5:d9 side side d19:d23. similarly, e5:e9 side side e19:e23. these combinations can done creating new sheet hope.

then think need run loop combine a2-1 , a2-2 data. a2 data starts @ row 32. spacing maintained throughout spreadsheet. think 1 should able put in loop go through entire sheet. there spaces in between data (rows), not sure how tell program run through entire sheet.

sub copydata()  lastrow = activesheet.range("a" & rows.count).end(xlup).row  = 8 lastrow  range(cells(i, 1), cells(i, 4)).select selection.copy  erow = activesheet.cells(rows.count, 1).end(xlup).offset(1, 0).row  activesheet.cells(erow, 1).select activesheet.paste activeworkbook.save activeworkbook.close application.cutcopymode = false end if  next  end sub 

you might able without macro. if take structure of sample sheet showed, create new sheets , use index formula bring values need , order want them by. column d, have new sheet named appropriately. column a, list partial sample name (a1-, b1-, etc.). row 1, have rest (1-5). in cell b2, enter formula

=index('sheet1'!$d:$d,match($a2 & b$1,'sheet1'!$b:$b,0)) 

fill down , right. should want. on other sheets, change initial range of index formula respective column.

i hope helps.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -