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
 
Back
Top