Lookup Help

MrOaks

New Member
Joined
Apr 25, 2018
Messages
9
Hi,

I have a spreadsheet with 2 tabs.
  1. 1 tab contains multiline values (column A) and it's master name (column B)
  2. The other tab has split out those multiline values into separate rows

What I now want to do is look up the master name in the split out sheet but I can't figure out a way to lookup against the multiline cells.

Example multiline sheet:
Process1
Process2
Process3
Master1
Process4
Process5
Master2

<tbody>
</tbody>

Example split out sheet:
Process1??
Process2??
Process3??
Process4??
Process5??

<tbody>
</tbody>
So now, I want to look up the master name (??) on value process(n) against where it finds it in the multiline cell.

Can this be done?

Thanks
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Im thinking there may be better ways but this works. Put first table in A1:B5 and eg Process2 in D1:

=LOOKUP(2,1/($B$1:INDEX($B$1:$B$1000,MATCH(D1,$A$1:$A$1000,0))<>""),$B$1:INDEX($B$1:$B$1000,MATCH(D1,$A$1:$A$1000,0)))
 
Upvote 0
Im thinking there may be better ways but this works. Put first table in A1:B5 and eg Process2 in D1:

=LOOKUP(2,1/($B$1:INDEX($B$1:$B$1000,MATCH(D1,$A$1:$A$1000,0))<>""),$B$1:INDEX($B$1:$B$1000,MATCH(D1,$A$1:$A$1000,0)))

Thanks, but I can't get it to work with my data across 2 different sheets.

The multiline cells to lookup against is SHEETA and the lookup value is in SHEETB.

When I amend the above to reflect that, it doesn't work.
 
Upvote 0
Thanks, but I can't get it to work with my data across 2 different sheets.

The multiline cells to lookup against is SHEETA and the lookup value is in SHEETB.

When I amend the above to reflect that, it doesn't work.

this is how Steve's post#2 work


Book1
AB
1Process1Master1
2Process2
3Process3
4Process4Master2
5Process5
SHEETA



Book1
AB
1Process1Master1
2Process2Master1
3Process3Master1
4Process4Master2
5Process5Master2
SHEETB
Cell Formulas
RangeFormula
B1=LOOKUP(2,1/(SHEETA!$B$1:INDEX(SHEETA!$B$1:$B$1000,MATCH(A1,SHEETA!$A$1:$A$1000,0))<>""),SHEETA!$B$1:INDEX(SHEETA!$B$1:$B$1000,MATCH(A1,SHEETA!$A$1:$A$1000,0)))
 
Upvote 0
this is how Steve's post#2 work

AB
1Process1Master1
2Process2
3Process3
4Process4Master2
5Process5

<tbody>
</tbody>
SHEETA



AB
1Process1Master1
2Process2Master1
3Process3Master1
4Process4Master2
5Process5Master2

<tbody>
</tbody>
SHEETB

Worksheet Formulas
CellFormula
B1=LOOKUP(2,1/(SHEETA!$B$1:INDEX(SHEETA!$B$1:$B$1000,MATCH(A1,SHEETA!$A$1:$A$1000,0))<>""),SHEETA!$B$1:INDEX(SHEETA!$B$1:$B$1000,MATCH(A1,SHEETA!$A$1:$A$1000,0)))

<tbody>
</tbody>

<tbody>
</tbody>

Ah, I see now. That makes sense.

However my data looks a bit different.

SheetA
AB
1Process1
Process2
process3
Master1
2Process4
Process5
Master2
3Process6
Process7
Master3
4Process8Master4

<tbody>
</tbody>


SheetB
AB
1Process1NEED to LOOKUP
2Process2NEED to LOOKUP
3Process3NEED to LOOKUP
4Process4NEED to LOOKUP
5Process5NEED to LOOKUP

<tbody>
</tbody>

So, in SheetA, the process are multiline. In SheetB I have separated them out, and now in Sheet B I want to look up the Master Name against the multiline cell in SheetA.

Hopefully, that's a bit clearer.
 
Last edited:
Upvote 0
may be you can try this


Book1
AB
1Process1 Process2 Process3Master1
2Process4 Process5Master2
3Process5
4Process6 Process7Master3
5Process8Master4
A



Book1
AB
1Process1Master1
2Process2Master1
3Process3Master1
4Process4Master2
5Process5Master2
B
Cell Formulas
RangeFormula
B1=INDEX(A!$B$1:$B$5,MATCH("*"&A1&"*",A!$A$1:$A$5,0))
 
Last edited:
Upvote 0
may be you can try this

AB
1Process1
Process2
Process3
Master1
2Process4
Process5
Master2
3Process5
4Process6
Process7
Master3
5Process8Master4

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
A



AB
1Process1Master1
2Process2Master1
3Process3Master1
4Process4Master2
5Process5Master2

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
B

Worksheet Formulas
CellFormula
B1=INDEX(A!$B$1:$B$5,MATCH("*"&A1&"*",A!$A$1:$A$5,0))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

You're a hero, Alan.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top