Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default partial match in vlookup with table array

Hi, need help. I have searched the discussion threads and, in theory, found
what I needed, however it will not work for me. I get a #value
No matter what I do, I cannot get rid of the #value. I found the below
function formulas that I need and do not work for me.

I have a 5 character code in one worksheet and on the other worksheet, that
code is followed by a - and then a name. I just want to use a LEFT to gather
the needed data.

Does anyone know what I am missing here?

=Vlookup("ABCD",LEFT(A1:B200,5),2,0)

=VLOOKUP(Left(A1,FIND(",",A1)-1),YourTableOfData,YourValueToReturnCol,0)
That will take the EE-A from "EE-A, FlexMed ($25.00)" and find that value in
your table.
Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default partial match in vlookup with table array

Two problems I see, you say that you have a 5 character code, and your
VLOOKUP("ABCD",Left(A1:B200,5),2,0)
is trying to match 4 characters (ABCD) against 5 characters in the table,
either change the "ABCD" to valid 5-character lookup, or change ,5) to ,4).

Also, the formula needs to be entered as an array formula. You do this by
commiting the formula with [Ctrl]+[Shift]+[Enter] instead of the normal
[Enter] key. When you do it right, Excel will add { and } around the
formula. If you have to edit the formula later, you have to again commit it
with the 3-key combination.

Seems after that, things work well, and I think the variation you have of it
using FIND() will probably work also.

Hope this helps.

"Jneel" wrote:

Hi, need help. I have searched the discussion threads and, in theory, found
what I needed, however it will not work for me. I get a #value
No matter what I do, I cannot get rid of the #value. I found the below
function formulas that I need and do not work for me.

I have a 5 character code in one worksheet and on the other worksheet, that
code is followed by a - and then a name. I just want to use a LEFT to gather
the needed data.

Does anyone know what I am missing here?

=Vlookup("ABCD",LEFT(A1:B200,5),2,0)

=VLOOKUP(Left(A1,FIND(",",A1)-1),YourTableOfData,YourValueToReturnCol,0)
That will take the EE-A from "EE-A, FlexMed ($25.00)" and find that value in
your table.
Thanks for your help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default partial match in vlookup with table array

Thanks, yea I saw that I left of the fifth character in my example.

entering as an array worked - sort of, I may be asking for too much, however
the result only filled in the 5 characters, I wanted the return to be
exactly what was in the column, with the code - name.

Is that not possible?

"JLatham" wrote:

Two problems I see, you say that you have a 5 character code, and your
VLOOKUP("ABCD",Left(A1:B200,5),2,0)
is trying to match 4 characters (ABCD) against 5 characters in the table,
either change the "ABCD" to valid 5-character lookup, or change ,5) to ,4).

Also, the formula needs to be entered as an array formula. You do this by
commiting the formula with [Ctrl]+[Shift]+[Enter] instead of the normal
[Enter] key. When you do it right, Excel will add { and } around the
formula. If you have to edit the formula later, you have to again commit it
with the 3-key combination.

Seems after that, things work well, and I think the variation you have of it
using FIND() will probably work also.

Hope this helps.

"Jneel" wrote:

Hi, need help. I have searched the discussion threads and, in theory, found
what I needed, however it will not work for me. I get a #value
No matter what I do, I cannot get rid of the #value. I found the below
function formulas that I need and do not work for me.

I have a 5 character code in one worksheet and on the other worksheet, that
code is followed by a - and then a name. I just want to use a LEFT to gather
the needed data.

Does anyone know what I am missing here?

=Vlookup("ABCD",LEFT(A1:B200,5),2,0)

=VLOOKUP(Left(A1,FIND(",",A1)-1),YourTableOfData,YourValueToReturnCol,0)
That will take the EE-A from "EE-A, FlexMed ($25.00)" and find that value in
your table.
Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default partial match in vlookup with table array

=Vlookup("ABCD",LEFT(A1:B200,5),2,0)
I have a 5 character code in one worksheet and
on the other worksheet, that code is followed by
a - and then a name.


Try it like this:

=INDEX(B1:B200,MATCH("abcde-*",A1:A200,0))

Or, using a cell to hold the lookup value:

D1 = abcde

=INDEX(B1:B200,MATCH(D1&"-*",A1:A200,0))

--
Biff
Microsoft Excel MVP


"Jneel" wrote in message
...
Hi, need help. I have searched the discussion threads and, in theory,
found
what I needed, however it will not work for me. I get a #value
No matter what I do, I cannot get rid of the #value. I found the below
function formulas that I need and do not work for me.

I have a 5 character code in one worksheet and on the other worksheet,
that
code is followed by a - and then a name. I just want to use a LEFT to
gather
the needed data.

Does anyone know what I am missing here?

=Vlookup("ABCD",LEFT(A1:B200,5),2,0)

=VLOOKUP(Left(A1,FIND(",",A1)-1),YourTableOfData,YourValueToReturnCol,0)
That will take the EE-A from "EE-A, FlexMed ($25.00)" and find that value
in
your table.
Thanks for your help.



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
Find partial match from column A,B and fill partial match in C? Tacrier Excel Discussion (Misc queries) 4 October 24th 08 11:24 PM
Vlookup using a partial text match JGROVE Excel Worksheet Functions 1 August 15th 08 03:18 PM
Partial Address match in an array [email protected] Excel Discussion (Misc queries) 0 October 13th 06 04:17 PM
Partial String Match & Wild Cards Using VLOOKUP djDaemon Excel Worksheet Functions 0 March 9th 06 05:49 PM
Partial String Match Using VLOOKUP cdhmotes Excel Worksheet Functions 4 December 26th 05 10:26 PM


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