excel - Copy a range from one sheet to the first empty row from another sheet -


in excel sheet have inserted button executes macro. code macro:

sub button1_click() ' ' button1_click macro ' ' keyboard shortcut: option+cmd+y '     range("a17:i34").select     selection.copy     sheets("items control").select     range("a7").select     selection.pastespecial paste:=xlvalues, operation:=xlnone, skipblanks:= _         false, transpose:=false     range("a3:i9").select end sub 

the source sheet "orden de compra" , sheet want copy selected range "items control".

what need copy not empty rows selected range first empty row end sheet, , not range have in current code.

thank you

would work?

sub button1_click()      'this select whole range of cells starting in a17     sheets("orden de compra").select     range(range("a17"), range("a17").end(xldown).end(xltoright)).copy      'now need find first free row in next sheet, assuming rows have on column     sheets("items control").select     range("a1").end(xldown).offset(1, 0).select     selection.pastespecial paste:=xlvalues, operation:=xlnone, skipblanks:= _             false, transpose:=false   end sub 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -