View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Magnivy
 
Posts: n/a
Default Matching Adjacent Columns?

Try using a VLOOKUP as follows

=IF(ISERROR(VLOOKUP(C2,$A$1:$A5000,1,FALSE)),"No
Match",VLOOKUP(C2,$A$1:$A5000,1,FALSE))

"gnotnoel via OfficeKB.com" wrote:

I'm having trouble writing a formula to insert specific values from a column
that was a result of a match with a column adjacent to it.

Basically, I have three columns
-one is a list of names (AD66564..etc...etc..(machine #))
-second is a list with the values associated with these names (in this case,
the location of each machine, j5/4byprinter)
-third is another list of names (AD979879..etc..etc..)

On the forth column, I want to be able to match each name of the third column
with a name in the first column. So that if the name being tested matches the
name in the any row of the first colum, than it should display the value of
the second column that is adjacent to the first column. If not, than it
should display "no match".

I am able to use =match(C2,A:A,0) so that it displays the location of a match
with the first column. But I would rather want it to display the value of the
second column.

something like....=IF(Match(C2,A:A,0),B:B,"No Match") but this doesnt work!

Any help would be greatly appreciated :)

Noel

--
Message posted via http://www.officekb.com