I am working on a file that has two columns. The first column has simple three word sentences. The second one has single word keywords.
I’d like to be able search the first column, find all sentences that have a specific keyword and list them as delimited values next to the keyword.
Assuming a pipe (“|”) as a delimiter, I’d get something like this:
First Column
Very blue sky.
Red sky tonight.
Blue sky forever.
My red car.
Red red red.
Second column is as follows:
Second Column
Blue
Red
Desired Solution (has 2 columns, Blue and Red are in the first column)
Second Column Results Column
Blue Very blue sky. | Blue sky forever.
Red Red sky tonight. | My red car. | Red red red.
Thanks!
Here is one way of doing it.
Paste below code in the code pane.
Then you can use this function in sheet like any other normal function e.g.
=ConcatPartLookUp(B2,A2:A6)
Please note I have provided two more optional arguments which may prove useful in the long run. If you want to make it case sensitive and pass a different delimiter say "#" then you need to use:
=ConcatPartLookUp(B2,A2:A6,"#",TRUE)