Index/Match - Return value if partial text from cell contained anywhere in separate column

excelnewb221

New Member
Joined
Dec 14, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello.
This is round 2.
I posted the question yesterday, and got a terrific response, but i neglected to mention one thing -
The current formula is incredible, but works on a row by row basis.
Index/Match - Return value if partial text from cell contained in separate column

however, I forgot to mention that I need the formula to search all throughout column A. If there is a match, then it returns the respective value that it found, whichever row it was in, within column A.

I am not able to install the XL2BB addin due to admin rights unfortunately.

as i type this out now, I'm not how it would be possible, especially when there are redundant words in column A,
but I would greatly appreciate any help to help in figuring this out.

thanks again. please let me know if I can explain this in a better way.

Data (column A)Formula (column B)Lookup Value (column C)
Apple Carrot OrangeApple Carrot OrangeOrange
Beet Tomato OnionPepper Banana GrapeBanana
Pepper Banana GrapeLettuce Kale ChiaKale
Lettuce Kale ChiaN/ASpinach
Apple CarrotLettuce Kale ChiaChia
Beet TomatoBeet TomatoTomato
Pepper Banana GrapeN/AStrawberry
Kale ChiaBeet Tomato & Beet Tomato OnionBeet
Apple Carrot OrangeLettuce Kale Chia & Kale ChiaKale
Tomato OnionN/AJuice
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I sent the formula in post #14


Excel Formula:
=LET(a,A2:A5,BYROW(C2:C11,LAMBDA(bx,INDEX(a,UNIQUE(MAX(IFERROR(BYROW(TEXTSPLIT(bx,," "),LAMBDA(br,MATCH("*"&br&"*",a,0))),-ROW($A$1))))+ROW($A$1)-1))))
 
Upvote 1
Solution
In column C are you only going to have one word?

1689102089557.png
 
Upvote 1
If in column C you only have one word.

First, I recommend that in column A you only have unique values:
varios 11jul2023.xlsm
ABC
1Data (column A)Formula (column B)Lookup Value (column C)
2Apple Carrot OrangeBeet Tomato Onion & Beet TomatoBeet
3Beet Tomato OnionPepper Banana GrapeBanana
4Pepper Banana GrapeLettuce Kale Chia & Kale ChiaKale
5Lettuce Kale ChiaSpinach
6Apple CarrotLettuce Kale Chia & Kale ChiaChia
7Beet TomatoBeet Tomato Onion & Beet Tomato & Tomato OnionTomato
8Kale ChiaStrawberry
9Tomato OnionBeet Tomato Onion & Beet TomatoBeet
10Lettuce Kale Chia & Kale ChiaKale
11Juice
12Apple Carrot OrangeOrange
Hoja4


In cell B2 put the following formula (You don't need to copy it down)
Excel Formula:
=BYROW(C2:C12,LAMBDA(br,TEXTJOIN(" & ",,IF(ISNUMBER(SEARCH(br,A2:A9)),A2:A9,""))))
 
Upvote 1
In column C are you only going to have one word?

View attachment 95076
@DanteAmor , thank you so much for your help.
I tried your solution in Post #14 and i love it. I'm tinkering around with it, and even if column A doesn't contain unique values, the value returned by the formula should help flag the item and will basically alert me that I should look into the item more, which i'm happy to do manually, since the formula takes care of all the hard work.
I'll spend a few days toying around with this. but this was extremely helpful. Thanks again.

To answer your question:
Column C will be a variable and change every time I need to use this file. Most likely 95% of the time, column C will contain multiple words.
Column A is actually a list of about 1,000 classifications, the list is static and cannot change.
Column A contains multiple words, and also acronyms. Unfortunately, the column cannot contain only unique values.
 
Upvote 0
Thanks for this solution as well Dante. This has been a great learning experience for me.
I'm toying around with this formula, and I like how it can produce two results.
I'm also seeing why you recommend only having unique values in column A.

I'm trying to think if there's a better way I should have phrased my request.
I can still make elaborate use of both your formula in tandem, but wonder if there's a way to do this that would better help place the orange highlights cells below.
if you don't mind, I may have to come back with more questions in a day or two.

while the below rules are the same:
Column C will be a variable and change every time I need to use this file. Most likely 95% of the time, column C will contain multiple words.
Column A is actually a list of about 1,000 classifications, the list is static and cannot change.
Column A contains multiple words, and also acronyms. Unfortunately, the column cannot contain only unique values.

Partial text lookup.xlsx
ABC
1DataFormulaOriginal Value
2Apple Carrot OrangeApple Carrot OrangeCarrot
3Beet Tomato OnionBeet Tomato Onion & OnionOnion
4Pepper Banana GrapeBeet Juice
5Lettuce Kale ChiaLettuce Kale ChiaChia
6BeetBeet Tomato Onion & BeetBeet
7OnionOnions
8Pepper Banana#N/ABanana
9Pepper Banana JackLettuce Chia Kale
Solution 1 (2)




If in column C you only have one word.

First, I recommend that in column A you only have unique values:
varios 11jul2023.xlsm
ABC
1Data (column A)Formula (column B)Lookup Value (column C)
2Apple Carrot OrangeBeet Tomato Onion & Beet TomatoBeet
3Beet Tomato OnionPepper Banana GrapeBanana
4Pepper Banana GrapeLettuce Kale Chia & Kale ChiaKale
5Lettuce Kale ChiaSpinach
6Apple CarrotLettuce Kale Chia & Kale ChiaChia
7Beet TomatoBeet Tomato Onion & Beet Tomato & Tomato OnionTomato
8Kale ChiaStrawberry
9Tomato OnionBeet Tomato Onion & Beet TomatoBeet
10Lettuce Kale Chia & Kale ChiaKale
11Juice
12Apple Carrot OrangeOrange
Hoja4


In cell B2 put the following formula (You don't need to copy it down)
Excel Formula:
=BYROW(C2:C12,LAMBDA(br,TEXTJOIN(" & ",,IF(ISNUMBER(SEARCH(br,A2:A9)),A2:A9,""))))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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