It is basically the help example from the find method and illustrates how
you can find multiple instances of a value on a spreadsheet.
I assume you only need to fine a unique match to your data.
Dim sh as worksheet, sh1 as worksheet
Dim rng1 as range, rng2 as range, rng3 as range
set sh = Worksheets("Output")
set sh1 = Worksheets("Database")
set rng1 = sh.Range(sh.Cells(1,1),sh.Cells(rows.count,1).End( xlup))
set rng2 = sh1.Range(sh1.Cells(1,1),sh1.Cells(rows.count,1).E nd(xlup))
for each cell in rng1
set rng3 = rng2.find(what:=cell.Value, Lookat:=xlWhole)
if not rng3 is nothing then ' found match
cell.offset(0,1).Value = rng3.offset(0,1).Value
else
cell.offset(0,1).Value = "No Match"
end if
Next
--
Regards,
Tom Ogilvy
"Nic@Rolls-Royce " wrote in
message ...
Unsure how this works..... or how to adapt...
---
Message posted from http://www.ExcelForum.com/