Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Using VLOOKUP without a sorted list

Hello,

I have a worksheet containing a list of parts with two different part
numbers assigned to each (sorted by the first part number). I have another
worksheet with a partial list of the second type of part number. I want to
fill the column next to it with it's corresponding part number.

Here are the problems with the functions embedded in Excel:
1. VLOOKUP can only lookup lists only if they're sorted in ascending order
in the first column.
2. LOOKUP doesn't have the option to give 'exact' results.

Here's a simplified example of my dilemma:

--SHEET 1--
Alias 1 Alias 2
1 B
2 A
3 C
4 D
5 E

--SHEET 2--

Alias 1 Alias 2
??? D
??? E

Please note that for this example, LOOKUP will work just fine. But in my
actual case, Alias 1 and/or 2 part numbers can be missing.

Do I need to resort to writing a macro for this? Or can I work with the
tools Excel has provided for me to accomplish this?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Using VLOOKUP without a sorted list

I figured it out, I used the INDEX() and a nested MATCH() function:

=INDEX(Worksheet1,MATCH(Reference,[WorkSheet1 Alias2 Row],0),1)

"dzuy" wrote:

Hello,

I have a worksheet containing a list of parts with two different part
numbers assigned to each (sorted by the first part number). I have another
worksheet with a partial list of the second type of part number. I want to
fill the column next to it with it's corresponding part number.

Here are the problems with the functions embedded in Excel:
1. VLOOKUP can only lookup lists only if they're sorted in ascending order
in the first column.
2. LOOKUP doesn't have the option to give 'exact' results.

Here's a simplified example of my dilemma:

--SHEET 1--
Alias 1 Alias 2
1 B
2 A
3 C
4 D
5 E

--SHEET 2--

Alias 1 Alias 2
??? D
??? E

Please note that for this example, LOOKUP will work just fine. But in my
actual case, Alias 1 and/or 2 part numbers can be missing.

Do I need to resort to writing a macro for this? Or can I work with the
tools Excel has provided for me to accomplish this?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Using VLOOKUP without a sorted list

Vlookup can be set to only retrun exact matches and not require the list to
be sorted using the Optional 4th argument. The default of the 4th argument is
true meaning that it looks for a closest match, but if you speicify false
then it will only return exact matches.

=Vlookup(A1, B1:C100, 2, False)

Looks for an exact match to the value in A1 from the Column B1:C100
returning the second column value...
--
HTH...

Jim Thomlinson


"dzuy" wrote:

Hello,

I have a worksheet containing a list of parts with two different part
numbers assigned to each (sorted by the first part number). I have another
worksheet with a partial list of the second type of part number. I want to
fill the column next to it with it's corresponding part number.

Here are the problems with the functions embedded in Excel:
1. VLOOKUP can only lookup lists only if they're sorted in ascending order
in the first column.
2. LOOKUP doesn't have the option to give 'exact' results.

Here's a simplified example of my dilemma:

--SHEET 1--
Alias 1 Alias 2
1 B
2 A
3 C
4 D
5 E

--SHEET 2--

Alias 1 Alias 2
??? D
??? E

Please note that for this example, LOOKUP will work just fine. But in my
actual case, Alias 1 and/or 2 part numbers can be missing.

Do I need to resort to writing a macro for this? Or can I work with the
tools Excel has provided for me to accomplish this?

Thanks!

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
Excel: VLOOKUP returns #N/A for a sorted value that exists?? WHY? iguttin Excel Worksheet Functions 4 February 19th 09 06:26 PM
sorted one list based on another one rachel h Excel Discussion (Misc queries) 0 May 22nd 07 10:30 PM
Why must the table for Vlookup be sorted in ascending order? Epinn New Users to Excel 3 August 12th 06 08:04 AM
Sorted list G Chartrand Excel Discussion (Misc queries) 2 April 28th 06 05:07 PM
Need sorted validation list [email protected] Excel Worksheet Functions 0 September 23rd 05 06:15 PM


All times are GMT +1. The time now is 01:42 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"