Textjoin based on max number of occurrences

ellison

Active Member
Joined
Aug 1, 2012
Messages
356
Office Version
  1. 365
Platform
  1. Windows
Hi, we are trying to join text together based on the number of occurrences...

i.e. to concatenate relevant info into the row which is the first occurrence

Hopefully this may make it a little clearer :ROFLMAO:




textjoin-based-on-max-occurrences-question.xlsx
ABCDE
1RowClassificationnth occurrence of the class'nInfoTarget
22Alpha1PleaseOccurrence 1: Please ; Occurrence 2: Amalgamate ; Occurrence 3: This
33Alpha2Amalgamate
44Alpha3This
55Beta1ColumnOccurrence 1: Column ; Occurrence 2: ;
66Beta2
77Charlie1Some FieldsOccurrence 1: Some Fields ;
88Delta1Occurrence 1: ; Occurrence 2: Are ; Occurrence 3: ; Occurrence 4: Numbers ; Occurrence 5: 10;
99Delta2Are
1010Delta3
1111Delta4Numbers
1212Delta510
Sheet1
Cell Formulas
RangeFormula
C2:C12C2=COUNTIF(B$2:B2,B2)



Huge thanks for taking a look!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Your Target results don't look entirely consistent to me. Would this be sufficient?

23 11 09.xlsm
BDE
1ClassificationInfo
2AlphaPleaseOccurrence 1: Please ; Occurrence 2: Amalgamate ; Occurrence 3: This
3AlphaAmalgamate 
4AlphaThis 
5BetaColumnOccurrence 1: Column ; Occurrence 2:
6Beta 
7CharlieSome FieldsOccurrence 1: Some Fields
8DeltaOccurrence 1: ; Occurrence 2: Are ; Occurrence 3: ; Occurrence 4: Numbers ; Occurrence 5: 10
9DeltaAre 
10Delta 
11DeltaNumbers 
12Delta10 
Textjoin
Cell Formulas
RangeFormula
E2:E12E2=IF(B2=B1,"",LET(f,FILTER(D$2:D$12,B$2:B$12=B2),TEXTJOIN(" ; ",,"Occurrence "&SEQUENCE(ROWS(f))&": "&f)))
 
Upvote 0
Solution
Hi Peter, your results are better than what I'd hoped for ......!

Absolutely brilliant, does the job beautifullly

Many thanks
 
Upvote 0
You're welcome. Glad it helped. Thanks for the follow-up. :)
 
Upvote 1

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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