将一行的值合并到一个单元格中,然后使用单个公式在列中重复此过程。

huangapple go评论93阅读模式
英文:

Consolidate values of a row into a cell and repeating the process down a column using a single formula

问题

在一列中,我想要将一行中的所有数值合并,以顶部或最左侧的列标题名称分隔。我希望这个公式是一个单列公式,可以处理从一列到第500行。在Excel中,这将利用ArrayFormula,但由于这是Excel,我不知道如何将这个解决方案处理为一个单一的公式,而不必拖动/填充或使用自定义表格。

请查看下面的图片,我将在这里链接表格。

将一行的值合并到一个单元格中,然后使用单个公式在列中重复此过程。

英文:

In a column, I want to consolidate all the values in a row separated by the top or top-left-most column header name. I want the formula to be a single column formula that process down a column or up to row 500. In Google Sheets, this would utilize an ArrayFormula, but since this is Excel, I don't know how to process this solution as a single formula without having to drag down/fill down or use custom table.

See image below and I will link to the sheet here.

将一行的值合并到一个单元格中,然后使用单个公式在列中重复此过程。

答案1

得分: 3

以下是翻译好的部分:

连接数据

=LET(table,E4:M8,IgnoreNoCat,1,ShowNoMatch,0,
        hDel,CHAR(10)&CHAR(10),hdDel,CHAR(10),dcDel,", ",
    hd,TAKE(table,1),dd,DROP(table,1),
    h,SCAN("",hd,LAMBDA(a,v,IF(v<>"",v,a))),
    hu,UNIQUE(h,1),
    br,BYROW(dd,LAMBDA(r,LET(
        bc,BYCOL(hu,LAMBDA(c,LET(
            jd,TEXTJOIN(dcDel,IgnoreNoCat,FILTER(r,h=c)),
        IF(LEN(jd)=0,IF(ShowNoMatch,c,""),c&hdDel&jd)))),
    TEXTJOIN(hDel,,bc)))),

br)

将一行的值合并到一个单元格中,然后使用单个公式在列中重复此过程。

英文:

Join Data

=LET(table,E4:M8,IgnoreNoCat,1,ShowNoMatch,0,
        hDel,CHAR(10)&amp;CHAR(10),hdDel,CHAR(10),dcDel,&quot;, &quot;,
    hd,TAKE(table,1),dd,DROP(table,1),
    h,SCAN(&quot;&quot;,hd,LAMBDA(a,v,IF(v&lt;&gt;&quot;&quot;,v,a))),
    hu,UNIQUE(h,1),
    br,BYROW(dd,LAMBDA(r,LET(
        bc,BYCOL(hu,LAMBDA(c,LET(
            jd,TEXTJOIN(dcDel,IgnoreNoCat,FILTER(r,h=c)),
        IF(LEN(jd)=0,IF(ShowNoMatch,c,&quot;&quot;),c&amp;hdDel&amp;jd)))),
    TEXTJOIN(hDel,,bc)))),
br)

将一行的值合并到一个单元格中,然后使用单个公式在列中重复此过程。

huangapple
  • 本文由 发表于 2023年8月11日 02:30:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76878449.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定