View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Match Data on different lines

Henrik,

This formula

=MATCH(C2,H:H,False)

will return the row number of the first match, or an Error if there is no match. You can then use
that number to return another value, like this, from, say, column I:

=INDEX(I:I,MATCH(C2,H:H,False))

You can also trap the error to tidy things up:

=IF(ISERROR(MATCH(C2,H:H,False)),"No match found",MATCH(C2,H:H,False))

HTH,
Bernie
MS Excel MVP


"Henrik T" <Henrik wrote in message
...
Hi.

I have a document with bills imported from two different databases.
I'm trying to compare the value from for example C2 with H2 and if it isn't
a match i need to compare C2 with H3, H4 etc, until it fines a match (the
problem is that the data from one database misses about 500 of 2000 bills).

Is this possible to do with a macro or advanced filter?

Henrik