按组排列,不包括来自同一行的组成员 [英] Concatenate by group excluding group member from same row

查看:135
本文介绍了按组排列,不包括来自同一行的组成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在图像中创建集群列?需要连接所有常见整体值的单位值,但不包括其自身作为连接的值。我可以请求一些帮助来创建集群列吗?



每个集群都具有与结果相同的单位除了单位的所有单位:

 整体单元集群
总体1 UnitA1 {UnitA2,UnitA3}
总体1 UnitA2 {UnitA1,UnitA3}
总体1 UnitA3 {UnitA1,UnitA2}
总体2 UnitA4 {UnitA5}
总体2 UnitA5 {UnitA4}
总体3 UnitB62 {UnitB63,UnitB64,UnitB65}
总体3 UnitB63 {UnitB62, UnitB64,UnitB65}
总体3 UnitB64 {UnitB62,UnitB63,UnitB65}
总体3 UnitB65 {UnitB62,UnitB63,UnitB64}

$ b想想它可能是一个两步的过程,连接然后可能是搜索和替换?

解决方案

可以用公式实现,而是一个rigmarole。假设按照指示排序,总体在A1中:


  1. 在C1 集群,C2(在Row1中假定的标签):

      = IF (A1 = A2,C1&,B2,{&B2)


  2. <

    在D2中:

      = A1<> A2 


  3. 将这两个公式复制到适合的位置。


  4. 全选,复制,粘贴特殊值,值。


  5. 全部选择,DATA>大纲 - 小计,每次更改:总体,使用函数计数,将小计添加到:(ColumnD),替换当前小计,数据汇总,确定。


  6. 过滤并为ColumnA,文本过滤器,包含..., co <​​/ code>确定。


  7. 在第一行中可以看到下面的标题(假定为Row5)在ColumnC中输入:

      = C4 

    并复制适合。


  8. 取消筛选,全选,复制,粘贴特殊值。


  9. 选择ColumnA,HOME>编辑 - 查找&选择,替换...,查找内容:计数,全部替换。 ( C 之前的空格 Count 。)


  10. 全部选择,DATA>大纲,小计,全部删除。删除 Grand 行。


  11. 过滤以选择所有,但 TRUE FALSE 在ColumnD的第一个空白单元格中插入 1 ,然后复制下来。排除过滤器。


  12. 按ColumnA值,A到Z,然后按列B值,A到Z排序。


  13. 筛选ColumnD以选择 TRUE FALSE 并删除所选的ColumnC的内容行(离开标签)。


  14. 取消筛选并选择ColumnC。 HOME>编辑 - 查找&选择,转到特殊...,空白,确定。


  15. = ,UP,Ctrl + Enter。


  16. 全选,复制,粘贴特殊值,值。


  17. 全部选择 TRUE FALSE 在ColumnD中删除所选行。


  18. 在E2中复制以适应:

      =替代(替代(C2,{&,,{),& B2,),,& B2 


  19. 全选,复制,粘贴特殊,值,删除列C:D,输入集群在C1。


。 $ b

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:

  1. In C1 Cluster, in C2 (labels assumed in Row1):

    =IF(A1=A2,C1&", "&B2,"{"&B2)  
    

  2. In D2:

    =A1<>A2  
    

  3. Copy both formulae down to suit.

  4. Select all, Copy, Paste Special, Values.

  5. Select all, DATA > Outline - Subtotal, At each change in: Overall, Use function Count, Add subtotal to: (ColumnD), Replace current subtotals, Summary below data, OK.

  6. Filter and for ColumnA, Text Filters, Contains..., co, OK.

  7. In first row visible below header (assumed to be Row5) in ColumnC enter:

    =C4  
    

    and copy down to suit.

  8. Take off Filter, select all, Copy, Paste Special, Values.

  9. Select ColumnA, HOME > Editing - Find & Select, Replace..., Find what: Count, Replace All. (There is a space before the C of Count.)

  10. Select all, DATA > Outline, Subtotal, Remove All. Delete Grand row.

  11. 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.

  12. Sort by ColumnA Values, A to Z, then by Column B Values, A to Z.

  13. Filter ColumnD to select TRUE and FALSE and delete contents of ColumnC for the selected rows (leave label).

  14. Take off Filter and select ColumnC. HOME > Editing - Find & Select, Go To Special..., Blanks, OK.

  15. =, UP, Ctrl+Enter.

  16. Select all, Copy, Paste Special, Values.

  17. Select all but TRUE and FALSE in ColumnD and delete selected rows.

  18. In E2 copied down to suit:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2,"{"&B2&", ","{"),", "&B2,""),", "&B2,"")&"}"  
    

  19. Select all, Copy, Paste Special, Values, delete Columns C:D, enter Cluster in C1.

.

这篇关于按组排列,不包括来自同一行的组成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆