Is it possible to create the 'cluster' column in the image? Needing to concatenate the 'unit' values for all common 'overall' values, but not include itself as ones of the values being concatenated. Can I please get some help creating the 'cluster' column?
Each 'cluster' has all Units from the same Overall other than the Unit for the row for the result:
Overall Unit Cluster
Overall1 UnitA1 {UnitA2, UnitA3}
Overall1 UnitA2 {UnitA1, UnitA3}
Overall1 UnitA3 {UnitA1, UnitA2}
Overall2 UnitA4 {UnitA5}
Overall2 UnitA5 {UnitA4}
Overall3 UnitB62 {UnitB63, UnitB64, UnitB65}
Overall3 UnitB63 {UnitB62, UnitB64, UnitB65}
Overall3 UnitB64 {UnitB62, UnitB63, UnitB65}
Overall3 UnitB65 {UnitB62, UnitB63, UnitB64}
Thinking it could be a two step process, concatenate then maybe a search and replace?
Can be achieved with formulae, but rather a rigmarole. Assumes Sorted as indicated and Overall
is in A1:
In C1 Cluster
, in C2 (labels assumed in Row1):
=IF(A1=A2,C1&", "&B2,"{"&B2)
In D2:
=A1<>A2
Copy both formulae down to suit.
Select all, Copy, Paste Special, Values.
Select all, DATA > Outline - Subtotal, At each change in: Overall
, Use function Count, Add subtotal to: (ColumnD)
, Replace current subtotals, Summary below data, OK.
Filter and for ColumnA, Text Filters, Contains..., co
, OK.
In first row visible below header (assumed to be Row5) in ColumnC enter:
=C4
and copy down to suit.
Take off Filter, select all, Copy, Paste Special, Values.
Select ColumnA, HOME > Editing - Find & Select, Replace..., Find what: Count
, Replace All. (There is a space before the C
of Count
.)
Select all, DATA > Outline, Subtotal, Remove All. Delete Grand
row.
Filter to select all but TRUE
and FALSE
in ColumnD and insert 1
in first blank cell of ColumnB and copy down to suit. Take off Filter.
Sort by ColumnA Values, A to Z, then by Column B Values, A to Z.
Filter ColumnD to select TRUE
and FALSE
and delete contents of ColumnC for the selected rows (leave label).
Take off Filter and select ColumnC. HOME > Editing - Find & Select, Go To Special..., Blanks, OK.
=
, UP, Ctrl+Enter.
Select all, Copy, Paste Special, Values.
Select all but TRUE
and FALSE
in ColumnD and delete selected rows.
In E2 copied down to suit:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2,"{"&B2&", ","{"),", "&B2,""),", "&B2,"")&"}"
Select all, Copy, Paste Special, Values, delete Columns C:D, enter Cluster
in C1.
.