ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   search text string within array (https://www.excelbanter.com/excel-discussion-misc-queries/202607-search-text-string-within-array.html)

Geeban

search text string within array
 
Hello,

I am trying to look for partial text within a cell. What I am trying to do
is to find a cell that contains specific text from a cell. I am working from
2 different sheets in the same workbook.
Sheet 1, row A contains the container number I am looking for. Sheet 2 row A
also contains the container numbers, although some of these have 2 container
numbers in the same cell. Sheet 2, row C contains ETA which is what I would
like to return.
As some of the cells contain 2 container numbers, I cannot use a vlookup
find either of them. To put it simply, I want to use a lookup from partial
text and return a value on a corresponding row.

Any help is greatly appreciated.

T. Valko

search text string within array
 
Sheet 1, row A contains the container number I am looking for

Post several representative samples of these.

Sheet 2 row A also contains the container numbers,
although some of these have 2 container numbers
in the same cell.


Post several representative samples of these, also.

--
Biff
Microsoft Excel MVP


"Geeban" wrote in message
...
Hello,

I am trying to look for partial text within a cell. What I am trying to do
is to find a cell that contains specific text from a cell. I am working
from
2 different sheets in the same workbook.
Sheet 1, row A contains the container number I am looking for. Sheet 2 row
A
also contains the container numbers, although some of these have 2
container
numbers in the same cell. Sheet 2, row C contains ETA which is what I
would
like to return.
As some of the cells contain 2 container numbers, I cannot use a vlookup
find either of them. To put it simply, I want to use a lookup from partial
text and return a value on a corresponding row.

Any help is greatly appreciated.




Geeban

search text string within array
 
Hi,

A B C
D
Container ETA Container
ETA
MSKU APLU
01/11
APLU MSKU CMAU
01/12
CMAU ECMU
01/01
ECMU

To make this a bit less confusing, I will use the above layout on only 1
sheet. Essentially I would like to do a vlookup in column B:

=vlookup($A2,D:E,2,false)
This would return:
B2 = #N/A
B3 = 01/11
B4 = #N/A
B5 = 01/01

This returns an error for MSKU and CMAU as their cell value is not identical
to C3.
How can I lookup a text string in a cell, even if it is not exact but does
contain the text. I would like B2 and B4 to return 01/12.

Any help is greatly appreciated.


"T. Valko" wrote:

Sheet 1, row A contains the container number I am looking for


Post several representative samples of these.

Sheet 2 row A also contains the container numbers,
although some of these have 2 container numbers
in the same cell.


Post several representative samples of these, also.

--
Biff
Microsoft Excel MVP


"Geeban" wrote in message
...
Hello,

I am trying to look for partial text within a cell. What I am trying to do
is to find a cell that contains specific text from a cell. I am working
from
2 different sheets in the same workbook.
Sheet 1, row A contains the container number I am looking for. Sheet 2 row
A
also contains the container numbers, although some of these have 2
container
numbers in the same cell. Sheet 2, row C contains ETA which is what I
would
like to return.
As some of the cells contain 2 container numbers, I cannot use a vlookup
find either of them. To put it simply, I want to use a lookup from partial
text and return a value on a corresponding row.

Any help is greatly appreciated.





Max

search text string within array
 
=vlookup($A2,D:E,2,false)

Try in B2, copied down: =VLOOKUP("*"&$A2&"*",D:E,2,0)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,000 Files:359 Subscribers:56
xdemechanik
---

Geeban

search text string within array
 
YES!!!!This works. So simple but thanks a lot for your help.

"Max" wrote:

=vlookup($A2,D:E,2,false)


Try in B2, copied down: =VLOOKUP("*"&$A2&"*",D:E,2,0)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,000 Files:359 Subscribers:56
xdemechanik
---


Max

search text string within array
 
Welcome. Do take a moment to rate responses which help by pressing the "Yes"
button (like the ones below), from where you're reading this.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,000 Files:359 Subscribers:56
xdemechanik
---
"Geeban" wrote:
YES!!!!This works. So simple but thanks a lot for your help.




All times are GMT +1. The time now is 09:45 PM.

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