ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If values in two columns are equal I want to automatically execute a macro (https://www.excelbanter.com/excel-programming/289858-if-values-two-columns-equal-i-want-automatically-execute-macro.html)

Tom Rinks

If values in two columns are equal I want to automatically execute a macro
 
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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

If values in two columns are equal I want to automatically execute a macro
 
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

--
Regards,
Tom Ogilvy


Tom Rinks wrote in message
...
If values in two columns are equal, I want to automatically execute a
macro that will move the entire record to another sheet and delete the
row that the record was in.


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com