ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookups and wildcards? (https://www.excelbanter.com/excel-worksheet-functions/265938-vlookups-wildcards.html)

Dave H

Vlookups and wildcards?
 
I am trying to use a vlookup to lookup a value. Where the value I am looking up is say abcd but on my table it would be abc*. I can truncate abcd to abc and it will find it if I remove the *s from my table. However not every value on my table has an *. Is there a simple way to do this? I don't want to use true as I don't want an approximate match.

wickedchew

Quote:

Originally Posted by Dave H (Post 959502)
I am trying to use a vlookup to lookup a value. Where the value I am looking up is say abcd but on my table it would be abc*. I can truncate abcd to abc and it will find it if I remove the *s from my table. However not every value on my table has an *. Is there a simple way to do this? I don't want to use true as I don't want an approximate match.

could you attach a sample workbook here as a zip file?

Dave H

1 Attachment(s)
Quote:

Originally Posted by wickedchew (Post 959504)
could you attach a sample workbook here as a zip file?

Here is a sample

wickedchew

Quote:

Originally Posted by Dave H (Post 959506)
Here is a sample

Try:

=IFERROR(VLOOKUP(LEFT(A11,3),Table2,2,FALSE),VLOOK UP(LEFT(A11,3)&"*",Table2,2,0))

Dave H

Quote:

Originally Posted by wickedchew (Post 959508)
Try:

=IFERROR(VLOOKUP(LEFT(A11,3),Table2,2,FALSE),VLOOK UP(LEFT(A11,3)&"*",Table2,2,0))

That only works for the ones that do have a wildcard on the table, but it doesn't work for the ones that don't use the wildcard.

Thanks


All times are GMT +1. The time now is 01:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com