I have 4 columns. Column one is list of unique IDs, column 2 empty, column 3 is list of ids but there can be duplicates in it and column 4 has some text. Can I write some formula in column 2 that would check if the ID in column 1 is present in column 3 and for each time its present check if the text in the cell next to in in column 4 contains "hey" in it. If it does this text should be returned in column 2.
1 1 hey whatever
2 1 whatever
4 3 whatever
6 3 hey maybe
3 maybe
4 hey whatever maybe
5 whatever maybe
5 hey whatever
Maybe I'm over-complicating things, but I cant think of a way to break down the problem. Thanks in advance for any tips.
For this example the result should be:
1 hey whatever 1 hey whatever
2 N/a 1 whatever
4 hey whatever maybe 3 whatever
6 N/a 3 hey maybe
3 maybe
4 hey whatever maybe
5 whatever maybe
5 hey whatever
EDIT: The solution in the linked topic supposes that the values are given from the start and and it looks for exact line matches on a line here I think we need a formula that that cycles through the results of another formula until it finds a match.