Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ash
 
Posts: n/a
Default how to deal with multiple matches on vlookup?

doing a vlookup on company name - it may appear numerous times in the
spreadsheet I am looking up from, but I can't tell how it determines which
value to return. For example, Company ABC listed in 4 rows, 3 of which have
"no" and 1 has "yes". I want the yes. I have sorted alphabetically,
thinking it returns the first one. Need advice. Thanks.....Ash
  #2   Report Post  
Daniel Bonallack
 
Posts: n/a
Default

I thought it does return the first one if you put the parameter "False" as
the fourth parameter.

I'm sure someone has a cleverer formula, but you could sort by company, then
descending by the yes/no column?

Daniel

"Ash" wrote:

doing a vlookup on company name - it may appear numerous times in the
spreadsheet I am looking up from, but I can't tell how it determines which
value to return. For example, Company ABC listed in 4 rows, 3 of which have
"no" and 1 has "yes". I want the yes. I have sorted alphabetically,
thinking it returns the first one. Need advice. Thanks.....Ash

  #3   Report Post  
Kassie
 
Posts: n/a
Default

I do not quite understand what you want to achieve here. However, Vlookup
works best with a sorted database type list, where each name appears once
only. You will experience problems with multiple entries

"Daniel Bonallack" wrote:

I thought it does return the first one if you put the parameter "False" as
the fourth parameter.

I'm sure someone has a cleverer formula, but you could sort by company, then
descending by the yes/no column?

Daniel

"Ash" wrote:

doing a vlookup on company name - it may appear numerous times in the
spreadsheet I am looking up from, but I can't tell how it determines which
value to return. For example, Company ABC listed in 4 rows, 3 of which have
"no" and 1 has "yes". I want the yes. I have sorted alphabetically,
thinking it returns the first one. Need advice. Thanks.....Ash

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Say you have the company name in A1 of sheet1

And sheet2 is laid out like this:
column A--list of company names
column B--Yes/no
column C--value to be brought back.

=INDEX(Sheet2!C:C,MATCH(1,(Sheet2!A1:A100=A1)*(She et2!B1:B100="yes"),0))
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 (I used 100 rows) to match your data--but don't use the whole
column.

Ash wrote:

doing a vlookup on company name - it may appear numerous times in the
spreadsheet I am looking up from, but I can't tell how it determines which
value to return. For example, Company ABC listed in 4 rows, 3 of which have
"no" and 1 has "yes". I want the yes. I have sorted alphabetically,
thinking it returns the first one. Need advice. Thanks.....Ash


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VLOOKUP with multiple first column matches John Simons Excel Worksheet Functions 2 February 20th 05 01:27 AM
Can VLOOKUP return multiple answers based on several identical lo. jddtct Excel Worksheet Functions 3 January 11th 05 07:03 AM
vlookup with multiple lines of same value lostinexcel Excel Worksheet Functions 1 December 17th 04 02:06 PM
vlookup over multiple worksheets Neil Excel Worksheet Functions 3 December 16th 04 08:19 PM
Can vlookup return multiple matches in a single cell? cchristensen Excel Discussion (Misc queries) 3 December 2nd 04 01:56 AM


All times are GMT +1. The time now is 10:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"