Thread: RANGE MACRO
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JOSEPH WEBER JOSEPH WEBER is offline
external usenet poster
 
Posts: 33
Default RANGE MACRO

I am trying to compare two ranges of data. if those ranges are the same i
would like to delete one of them because it is a dup. How do i do this in
macros. what would be the syntax. i tried:
Range("A3:E3").Select
ActiveWorkbook.Names.Add Name:="RANGE1", RefersToR1C1:=Selection
Range("A4:E4").Select
ActiveWorkbook.Names.Add Name:="RANGE2", RefersToR1C1:=Selection
If Range("RANGE1") = Range("RANGE2") Then Range("RANGE2").Delete