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 Find numerical values in one cell,within another cell- is it possi

for the simplest comparison:
set rng = Range(cells(1,1),cells(1,1).End(xldown))
for each cell in rng
if instr(cell.offset(0,1),cell) then
cell.offset(0,2).Value = "Match"
else
cell.offset(0,2).Value = "Mismatch"
End if
Next

I can envision many scenarios where this would fail or fail sometimes, but
you have not espoused these, so no use overcomplicating.
--
Regards,
Tom Ogilvy

"ES" wrote in message
...
I am wondering if it is possible to create a macro to compare HLA data for
matches. HLA data is looking for the presence of values in column a in
column b. It is also looking for no numerical data that is not present in
column b to be present in column a. Here are a couple of examples:

column a column b
1,2 1,2,3 match since 1,2 in column a are
found in column b
1,2,7 1,2,3 mismatch since 7 in column a is not
found in columnb
1,2,3 1,2,3,7 match since 1,2,3 in column a are
found in column b

If anyone could provide help with a macro that would help with this data I
would really appreciate it.
Thank you,
E