View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Vlookup using two columns

You can use this kind of syntax:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))
(one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

==
But I got confused about what column is what.

Daniel Bonallack wrote:

In column A I have companies, in column B I have titles, in column C, I have
names

Column A repeats companies, as there are a bunch of titles for each company.

In column D, I would like to return the name of the "Managing Director" for
each company (so it will be one name repeated for each company), based on
looking up the title in column B in combination with each unique company

eg
IBM, Director, Bob [in D, returned value = "Tim"]
IBM, Managing Director, Tim [in D, returned value = "Tim"]
IBM, Vice President, Mary [in D, returned value = "Tim"]
3M, Director, Sarah [in D, returned value = "Robyn"]
3M, Managing Director, Robyn [in D, returned value = "Robyn"]

Thanks in advance

Daniel


--

Dave Peterson