excel - Copy to last non-empty cell in a row -


i want copy data specific range last active cell in specific row

right use code:

wrkbook1.sheets("sheet1").range("a" & cells.rows.count).end(xlup).copy 

it copies last active cell

this many lines put comment because have make sure cells inside range same worksheet.

'copy of sheet1 columns wrkbook1.sheets("sheet1")     .range("a1:a" & .cells(rows.count, 1).end(xlup).row).copy end  'paste next blank row in sheet2 column wrkbook1.sheets("sheet2")     .cells(rows.count, 1).end(xlup).offset(1, 0).pastespecial end 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -