View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Comparing 2 dynamic ranges for matching names

Dim rng1 as Range, rng2 as Range
Dim res as Variant, cell as Range
set rng1 = Range("Highlighted_Names")
set rng2 = Range("DownLoadedList")
rng1.Interior.colorIndex = xlNone
for each cell in rng1
res = Application.Match(cell,rng2,0)
if not iserror(res) then
cell.Interior.colorIndex = 3
end if
Next


--
Regards,
Tom Ogilvy

"Daminc" wrote in
message ...

I've spent the last 5-6 hours trying to solve this problem with no joy

I have one named range called Highlighted_names


Code:
--------------------
=OFFSET(Highlighted_data!$A$3,0,0,COUNTA(Highlight ed_data!$A:$A),1)
--------------------


and another called Downloaded_list


Code:
--------------------
=OFFSET(Download_sheet!$B$2,0,0,COUNTA(Download_sh eet!$B:$B),1)
--------------------


These are on 2 different sheets.

My hope is have a Marco that checks the cells in the first range and
compares it to the second range and Selects any matches.

I then intend to highlight the rows in which these matches occur.

Any help would be appreciated


--
Daminc
------------------------------------------------------------------------
Daminc's Profile:

http://www.excelforum.com/member.php...o&userid=27074
View this thread: http://www.excelforum.com/showthread...hreadid=473778