Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Matching cells across columns, and returning equal values Babymech Excel Discussion (Misc queries) 0 January 26th 09 04:41 PM
Determining if two columns values are equal/close GDCross Excel Discussion (Misc queries) 4 February 6th 07 12:44 PM
Automatically execute a CTRL-ALT-F9 when I open a workbook Antonio Duarte Excel Discussion (Misc queries) 1 June 15th 05 02:48 PM
Execute Macro automatically after hyperlink Bill Elerding Excel Discussion (Misc queries) 13 May 5th 05 01:01 AM
Execute Macro Yves Excel Discussion (Misc queries) 3 April 23rd 05 04:26 PM


All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"