English 中文(简体)
• 如何将多行合并成一行。
原标题:How to merge multiple rows into one row in excel?
  • 时间:2024-01-11 19:23:18
  •  标签:
  • excel
  • merge

我试图把多行合并成一行。 我对我的问题做了简要总结。

“mple

我想把所有数字输入一行(此处为第二行)。 我已经尝试了电修技术,但似乎没有适当工作。

为了给你提供情况,我的数据集有近2000年的数据。

Does anyone know of any easy way to merge all rows into 1 row? Thanks so much!

问题回答

你们能够用权力财富这样做:

  • insert a Table (ListObject) using the data you want to group
  • pivot > unpivot them as in the M code below:
    let
        Source = Excel.CurrentWorkbook(){[Name="MyListObjectName"]}[Content],
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Column1"}, "Attribute", "Value"),
        #"Pivoted Column" = Table.Pivot(#"Unpivoted Other Columns", List.Distinct(#"Unpivoted Other Columns"[Attribute]), "Attribute", "Value")
    in
        #"Pivoted Column"

页: 1

你们可以按以下方式使用“excel”功能,假设问题所列出的对口单位不存在“excel”式限制。 The Put in the cell: 编号:A10: / 编号:以下格式。

=LET(in, A1:I8, h,TAKE(DROP(in,,1),1), data,DROP(in,1), v,TAKE(data,,1),
 d,DROP(data,,1), seq, SEQUENCE(ROWS(d)), uxV,UNIQUE(v),
 idx, XMATCH(uxV,v), emptyRow, IF(SEQUENCE(,COLUMNS(d))>0,""),
 calc,REDUCE(h, seq, LAMBDA(ac,s, VSTACK(ac, IF(ISNA(XMATCH(s, idx)), emptyRow,
   BYCOL(FILTER(d, v=INDEX(v,s)), LAMBDA(c, @FILTER(c, c<>"",""))))))),
 HSTACK(VSTACK("",v), calc))

Here is the output: output

<in> 指明了整个输入数据集,然后将DROP/TAKE功能合并,以提取具体部分投入,例如:v,用于村庄,d。 它假定你想收集我们有一个新村的第一行的所有信息。 姓名idx确定了每个新村的指数位置(假设同一个村庄是一起)。 为了产生空洞的浏览量,我们使用了以下trick计:> IF(SE RequestNCE (,COLUMNS(d)>0,” and name itemptyrow

然后使用 REDUCE/VSTACK patterns生成产出(calc)。 累积器与头盔(h)一同启动。 每一行指数(s)和如果s指数与新村的起步相匹配,则按ISNA(XMATCH(s, idx)>。 如果该指数没有发现,那么该指数就会产生一个空档。 否则,它会过滤特定村庄(v=INDEX(v,s)),然后过滤<代码>的产出。 FILTER将为特定村庄的每个栏目提供<代码>BYCOL,以便通过<代码>@FILTER(c, c<>”>找到非豁免价值。” 它使用。 FILTER。 每个村的每栏只有一个价值。

Finally, we use HSTACK to accommodate the final output.





相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签