• 549K Members
• 6,656 Online
• 657K Conversations
SOLVED

Highlighted
New Contributor

# How to Match Certain Char and Return a Value from another Table based on the Matched Char?

Updated with attachment for demo of the problem

Hi Excel Experts Community,

In one list, OLA is repeated in several cells (under 1 column) but has no fixed position, so it comes in different positions in every cell (e.g., OLA-12, 22-OLA, PE-OLA-00, etc.)

And, in another table, I have two columns. Under the first Column, exactly OLA is listed in one cell along with another value next it to under the second column. The second table has different values under the two columns, so OLA is only in row.

How can I match OLA only from the 1st list and return the value next to the fixed string, OLA from the second table?

I WOULD BE so grateful for your support to solve this problem.

7 Replies
Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

Why not upload a small sample file with some dummy data along with the desired output mocked up manually to show the end result you are trying to achieve? That would help to visualize the desired output and to provide an accurate solution.

Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

Thank you very much for your response. I have just updated the thread with a file. Please, have a look.

Highlighted
Solution

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

You may try something like this...

Unmerge the cell B4 and then try this...

In B4

=LOOKUP(2,1/(ISNUMBER(SEARCH(TRIM(Table1[[Clean Code ]]),Table2[@CODE]))),Table1[Value])

and then copy it down.

Let me know if this is what you were trying to achieve.

Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

Thank you very much, it does work perfectly. Could you please re-write the formula using cell references instead of column names?

Thank You--

Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

You're welcome! Glad it worked as desired.

Here is the requested formula...

=LOOKUP(2,1/(ISNUMBER(SEARCH(TRIM(\$F\$4:\$F\$6),A4))),\$G\$4:\$G\$6)

Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

Thank you very much, indeed. I truly appreciate it. You really really saved my day!!

Highlighted

# Re: How to Match Certain Char and Return a Value from another Table based on the Matched Char?

You're welcome again!

Related Conversations
Counting Days
Tim Hunter in SQL Server on
2 Replies
A problem with the Zoom level of a Tab
Tavory in Discussions on
9 Replies
PWA fullscreen like IE11 kiosk mode
rogihee in Discussions on
5 Replies
PivotTable : Unexpected behavior with 2 tables
CastyChichi in Excel on
2 Replies