when condition is true, move row to end of different sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

would be grateful if anyone can help
i have a list of orders and if i type complete (or something) in a cell i
want the whole row to be moved to the end of another sheet
 
Gran said:
would be grateful if anyone can help
i have a list of orders and if i type complete (or something) in a cell i
want the whole row to be moved to the end of another sheet


private sub worksheet_change(ByVal Target As Excel.Range)
columnt = target.column
rowt = trim(str(target.row))
if columnt = 17 then goto moverow'say this is the column you type 'complete'
in
exit sub
moverow:
rows(rowt).cut
sheet2.activate 'this being the sheet you want to move it to
rowtomoveto = str(trim(sheet2.usedrange.rows.count +1))
rows(rowtomoveto).select
activesheet.paste
sheet1.activate 'Return you to your original sheet
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top