Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Match 9 to 11 digits - vlookup

I have a list of 9 digit numbers (missing the end 2). I need to lookup the
closest match in a list of 11 digit numbers. I tried vlookup but it pulls in
the value above the one that I want. How do I make it find the one with all
9 digits matching?
EX:

List1 List2
300005555 30000555201 - vlookup pulls in this one
30000555502 - i want this one
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Match 9 to 11 digits - vlookup

Maybe this will work

=INDEX(B2:B20,MATCH(TEXT(C1,"@"),LEFT(A2:A20,9),0) )

entered with ctrl + shift & enter

replacing


=VLOOKUP(C1,A2:B20,2,TRUE)


--
Regards,

Peo Sjoblom


"Laury" wrote in message
...
I have a list of 9 digit numbers (missing the end 2). I need to lookup the
closest match in a list of 11 digit numbers. I tried vlookup but it pulls
in
the value above the one that I want. How do I make it find the one with
all
9 digits matching?
EX:

List1 List2
300005555 30000555201 - vlookup pulls in this one
30000555502 - i want this one




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Match 9 to 11 digits - vlookup

=INDEX(K1:K20,MATCH(TRUE,300005555=--LEFT(J1:J20,9),0))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Laury" wrote in message
...
I have a list of 9 digit numbers (missing the end 2). I need to lookup the
closest match in a list of 11 digit numbers. I tried vlookup but it pulls
in
the value above the one that I want. How do I make it find the one with
all
9 digits matching?
EX:

List1 List2
300005555 30000555201 - vlookup pulls in this one
30000555502 - i want this one



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Match 9 to 11 digits - vlookup

Thanks - the index and match did the trick!

"Peo Sjoblom" wrote:

Maybe this will work

=INDEX(B2:B20,MATCH(TEXT(C1,"@"),LEFT(A2:A20,9),0) )

entered with ctrl + shift & enter

replacing


=VLOOKUP(C1,A2:B20,2,TRUE)


--
Regards,

Peo Sjoblom


"Laury" wrote in message
...
I have a list of 9 digit numbers (missing the end 2). I need to lookup the
closest match in a list of 11 digit numbers. I tried vlookup but it pulls
in
the value above the one that I want. How do I make it find the one with
all
9 digits matching?
EX:

List1 List2
300005555 30000555201 - vlookup pulls in this one
30000555502 - i want this one





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
Use Match or Vlookup? ECLynn Excel Discussion (Misc queries) 8 February 25th 07 10:30 PM
Vlookup or Match Sunnyskies Excel Discussion (Misc queries) 1 February 15th 07 03:58 PM
Vlookup or Match Sunnyskies Excel Discussion (Misc queries) 0 February 15th 07 03:26 PM
vlookup - Best match? Rory Carroll Excel Discussion (Misc queries) 3 August 24th 05 10:12 AM
Match or vlookup? Manos Excel Worksheet Functions 1 February 24th 05 01:09 PM


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

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

About Us

"It's about Microsoft Excel"