连接新工作表中的行和列

时间:2017-09-21 01:49:59

标签: excel excel-formula textjoin

我的sheet1如下所示:

   A   B   C   D
1      7   8   9   
2  x
3  y
4  z

在sheet2中,我想连接起来像这样:

   A
1  x | 7
2  y | 8
3  z | 9

我试过了:

=CONCATENATE(Sheet1!A2," | ",Sheet1!B$1)  

但是这给了我:

   A
1  x | 7
2  y | 7
3  z | 7

2 个答案:

答案 0 :(得分:1)

尝试,

=CONCAT(Sheet1!A2,"|", INDEX(Sheet1!B$1:D$1, , ROW(1:1)))

答案 1 :(得分:0)

另一个选择

=CONCATENATE(Sheet1!A2," | ",OFFSET(Sheet1!$A$1,0,ROW()))

=CONCATENATE(Sheet1!A2," | ",INDIRECT("Sheet1!" & ADDRESS(1,ROW()+1)))

注意: OFFSETINDIRECT都是易失性函数。有关易失性函数的详细信息,请参阅this