Column with Partial Match to Another Column to Give Desired Output

kkmmaahh1

New Member
Joined
Jun 3, 2017
Messages
4
Hey all!

I'm trying to search sentences with construction activities for a specific part of that sentence, and give the corresponding output. Here is an example from the file I am working on:

Column A:
[TABLE="width: 416"]
<colgroup><col width="416" style="width:312pt"> </colgroup><tbody>[TR]
[TD="class: xl64, width: 416"]LEVEL 04 - INSTALL STAIRS
[TABLE="width: 416"]
<colgroup><col width="416" style="width:312pt"> </colgroup><tbody>[TR]
[TD="width: 416"]LEVEL 07 - COLUMNS & SHEARWALLS/ STRIP PERIMETER FORM
[TABLE="width: 416"]
<colgroup><col width="416" style="width:312pt"> </colgroup><tbody>[TR]
[TD="width: 416"]LEVEL 07 - STRIP FORMS
[TABLE="width: 416"]
<colgroup><col width="416" style="width:312pt"> </colgroup><tbody>[TR]
[TD="width: 416"]LEVEL 01 - POUR 1

Column B: Column C:
pour 03
strip forms 05
install stairs 03
shearwalls 05

I have looked at endless threads to no avail; these two formulas came closest:

=INDEX(C1:C4,MATCH(A1,B1:B4,-1) :: this somehow gave 05 for all results

=INDEX(C1:C4,MATCH("*"&A1&"*",B1:B4,-1) :: This gave error #NA

I've tried changing the -1 in both of those to 0 and still got error #NA

I've also tried:
=VLOOKUP(A1,B1:C4,2,TRUE)
and = VLOOKUP("*"&A1&"*",B1:C4,2,TRUE), both to no avail.

Please help as I am slowly loosing my mind trying to figure this out! Thanks in advance!



[/TD]
[/TR]
[TR]
[TD="width: 416"][/TD]
[/TR]
[TR]
[TD="width: 416"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
It's unclear to me still what you are trying to do.

In your second post, you said:

C:
03
05
05
03

Is that the result you WANT? If so, where do those numbers come from?

Or are you saying this is what you are currently GETTING, but you WANT:

C:
01
07
04
07

... which are the level numbers that correspond to where the keywords in Column B were found?
 
Upvote 0
Upvote 0
It's unclear to me still what you are trying to do.

In your second post, you said:

C:
03
05
05
03

Is that the result you WANT? If so, where do those numbers come from?

Or are you saying this is what you are currently GETTING, but you WANT:

C:
01
07
04
07

... which are the level numbers that correspond to where the keywords in Column B were found?


My apologies for the poorly written post - it is my first and I was running pretty low on energy. The follow-up reply I posted earlier about column C was wrong anyway (my bad). Let me clarify:
example1.png


The example above shows what I was trying to write out. I need my output in column D as shown. The numbers in column C have nothing to do with the levels in column A. Rather, column C corresponds to column B. Namely, if a cell in column A contains the word(s) in column B, then column D should show column B's corresponding value in column C (wordy, I know). The final result should be as follows

desired%20soln.png



D1, which shows the value relevant to A1, shows 03 because B3 (install stairs) corresponds to C3 (03). D2 shows 05 because shearwalls (B4) corresponds to C4 (05). D3 shows shows 05 because B2 (strip forms) corresponds to C2 (05).

Unfortunately, the formula I am using (dragged down D) just gives me an output of "05" for all rows.

I hope things are clearer now. Thanks for bearing with me
 
Upvote 0
kkmmaahh1,

You have posted images that we can not use/copy into a worksheet.

This means that if this was a problem where one needed to use your data, anyone trying to help you would have to enter the data manually?????

Maybe someone else on MrExcel will be able to assist you.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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