reverse matching

david763

New Member
Joined
Apr 3, 2012
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,
I've gone down rabbit hole to the point of overthinking...

I have a value "R" on sheet1.

I am looking for matching values of "R" in a table on another sheet (there may be more than one occurrence of "R" in that column). For each occurrence there will be an adjacent "O" value.
Now, each of those "O" values will apply to other "R" values other than the original "R" value.

I am after a string (textjoin) where the resultant "O" values in the first match reverse match one of the other associated "R" values which match yet another column value of "enterprise" (there may be more than one occurrence of these also). I want those "R" values in a string...

I do have the ability to add a helper column to the table if needed but prefer not if that's possible...

Hope this makes sense. Thanks for any help...
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Your description of your ask isn't clear. It'd be helpful if you could post a mock-up sample of your data and expected result (10-20 rows).
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
sorry, I missed that... will remember in future...
 
Upvote 0
Your description of your ask isn't clear. It'd be helpful if you could post a mock-up sample of your data and expected result (10-20 rows).

Sorry, I can't seem to download xl2bb on my work computer. I have pasted data as text below if that works. If not, please don't bother with it.

Based on a 'Ref' value on adjacent sheet, my quest is to find a formula to manage the following:

Scenario 1:
Ref on other sheet = 1511.
This corresponds to Obj values 780 783 789 790 921 923 in my data
For EACH of those Obj values, I want to see if any subsequently LINK BACK to a Ref with type of 'enterprise'.
In this case, 780 links to an enterprise ref 4136, 783 to 4147, 789 to 4143, 790 to 4136 and 4144. Obj 921 and 923 do not have an equivalent 'enterprise' match.
I would like a string returned on original sheet "4136, 4147, 4143, 4136, 4144"

Scenario 2:
Ref on other sheet = 1507.
This corresponds to Obj value 786. There is no matching 'enterprise' value for that Obj.
Final string is blank.

I hope this makes sense..?


Ref Obj type
1498 780 basic
1498 789 basic
1507 786 basic
1511 780 basic
1511 783 basic
1511 789 basic
1511 790 basic
1511 921 basic
1511 923 basic
1523 789 basic
1537 923 basic
1538 786 basic
1571 789 basic
1574 780 basic
1950 780 basic
2008 789 basic
2009 780 basic
2010 780 basic
2012 780 basic
2014 921 basic
2016 780 basic
2017 780 basic
2017 790 basic
2027 780 basic
2029 780 basic
2029 790 basic
2038 780 basic
2039 789 basic
2041 780 basic
2059 786 basic
2060 923 basic
2063 780 basic
2072 780 basic
2073 789 basic
2076 780 basic
2077 783 basic
2081 783 basic
2091 780 basic
2091 789 basic
2091 790 basic
2123 780 basic
2123 789 basic
2124 780 basic
2124 789 basic
2125 789 basic
2126 780 basic
2126 783 basic
2127 780 basic
2127 790 basic
2137 780 basic
2137 789 basic
2137 923 basic
2138 786 basic
2138 789 basic
2139 780 basic
2139 790 basic
2139 923 basic
2140 780 basic
2140 923 basic
2372 780 basic
2373 789 basic
2375 780 basic
2376 780 basic
2377 790 basic
2378 783 basic
2379 783 basic
2381 786 basic
2382 780 basic
2622 780 basic
2623 780 basic
2629 786 basic
2793 780 basic
2793 789 basic
2793 921 basic
2794 790 basic
2870 783 basic
3000 786 basic
3669 923 basic
3760 780 basic
3825 790 basic
3826 790 basic
3827 780 basic
3828 790 basic
3834 786 basic
3835 923 basic
3887 923 basic
4042 786 basic
4136 780 enterprise
4136 790 enterprise
4138 786 enterprise
4143 789 enterprise
4144 790 enterprise
4147 783 enterprise
 
Upvote 0
Try:
Book1
ABCDEF
1RefObjTypeRef1511
21498780basic
31498789basicObjRef
41507786basic7804136
51511780basic7834147
61511783basic7894143
71511789basic7904136, 4144
81511790basic921
91511921basic923
101511923basic
111523789basic
121537923basic
131538786basic
141571789basic
151574780basic
161950780basic
172008789basic
182009780basic
192010780basic
202012780basic
212014921basic
222016780basic
232017780basic
242017790basic
252027780basic
262029780basic
272029790basic
282038780basic
292039789basic
302041780basic
312059786basic
322060923basic
332063780basic
342072780basic
352073789basic
362076780basic
372077783basic
382081783basic
392091780basic
402091789basic
412091790basic
422123780basic
432123789basic
442124780basic
452124789basic
462125789basic
472126780basic
482126783basic
492127780basic
502127790basic
512137780basic
522137789basic
532137923basic
542138786basic
552138789basic
562139780basic
572139790basic
582139923basic
592140780basic
602140923basic
612372780basic
622373789basic
632375780basic
642376780basic
652377790basic
662378783basic
672379783basic
682381786basic
692382780basic
702622780basic
712623780basic
722629786basic
732793780basic
742793789basic
752793921basic
762794790basic
772870783basic
783000786basic
793669923basic
803760780basic
813825790basic
823826790basic
833827780basic
843828790basic
853834786basic
863835923basic
873887923basic
884042786basic
894136780enterprise
904136790enterprise
914138786enterprise
924143789enterprise
934144790enterprise
944147783enterprise
Sheet2
Cell Formulas
RangeFormula
E4:F9E4=LET(a,A2:A94,b,B2:B94,c,C2:C94,obj,FILTER(b,(a=F1),""),HSTACK(obj,MAP(obj,LAMBDA(m,TEXTJOIN(", ",,FILTER(a,(b=m)*(c="enterprise"),""))))))
Dynamic array formulas.
 
Upvote 0
Another take:

Book1
ABCDEF
1RefObjType
21498780basic
31498789basicRefEnterprise Refs
41507786basic15114136, 4136, 4143, 4144, 4147
51511780basic15074138
61511783basic
71511789basic
81511790basic
91511921basic
101511923basic
111523789basic
121537923basic
131538786basic
141571789basic
151574780basic
161950780basic
172008789basic
182009780basic
192010780basic
202012780basic
212014921basic
222016780basic
232017780basic
242017790basic
252027780basic
262029780basic
272029790basic
282038780basic
292039789basic
302041780basic
312059786basic
322060923basic
332063780basic
342072780basic
352073789basic
362076780basic
372077783basic
382081783basic
392091780basic
402091789basic
412091790basic
422123780basic
432123789basic
442124780basic
452124789basic
462125789basic
472126780basic
482126783basic
492127780basic
502127790basic
512137780basic
522137789basic
532137923basic
542138786basic
552138789basic
562139780basic
572139790basic
582139923basic
592140780basic
602140923basic
612372780basic
622373789basic
632375780basic
642376780basic
652377790basic
662378783basic
672379783basic
682381786basic
692382780basic
702622780basic
712623780basic
722629786basic
732793780basic
742793789basic
752793921basic
762794790basic
772870783basic
783000786basic
793669923basic
803760780basic
813825790basic
823826790basic
833827780basic
843828790basic
853834786basic
863835923basic
873887923basic
884042786basic
894136780enterprise
904136790enterprise
914138786enterprise
924143789enterprise
934144790enterprise
944147783enterprise
Sheet6
Cell Formulas
RangeFormula
F4:F5F4=LET(a,$A$2:$A$94,b,$B$2:$B$94,c,$C$2:$C$94,TEXTJOIN(", ",1,FILTER(a,ISNUMBER(MATCH(b,FILTER(b,a=E4,""),0))*(c="enterprise"),"")))
 
Upvote 0
Solution
Thank you Eric. This works perfectly :). I just need to unpick it in my own brain to follow the logic... :LOL:
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
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