If values in two columns are equal I want to automatically execute a macro

  • Thread starter Thread starter Tom Rinks
  • Start date Start date
T

Tom Rinks

If values in two columns are equal, I want to automatically execute
macro that will move the entire record to another sheet and delete th
row that the record was in
 
If cells(rw,col1).value = cells(rw,col2).value then
cells(rw,col1).Entirerow.copy Destination:= _
ws.cells(rw.count,1).end(xlup)(2)
cells(rw.col1),Entirerow.delete
End if
 

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