简体   繁体   English

Excel/Google Sheets Offset 和 Transpose 公式问题

[英]Excel/Google Sheets Offset and Transpose formula question

I have a query regarding the OFFSET and TRANSPOSE formulas.我有一个关于OFFSETTRANSPOSE公式的查询。 I have the following two sheets set up in Google Sheets (originally in Excel):我在 Google 表格(最初在 Excel 中)中设置了以下两张表格:

First sheet:第一张: 第一张

Formula in cell B2: =transpose('Form responses 1'!A2:BB2) (original)单元格 B2 中的公式: =transpose('Form responses 1'!A2:BB2) (原始)

=transpose(offset('Form responses 1'!A$2:BB$2,COLUMNS($A$2:A2)-1,0)) (current) =transpose(offset('Form responses 1'!A$2:BB$2,COLUMNS($A$2:A2)-1,0)) (当前)

Formula in cell C2: =transpose('Form responses 1'!A3:BB3)单元格 C2 中的公式: =transpose('Form responses 1'!A3:BB3)

Formula in cell D2: =transpose('Form responses 1'!A4:BB4)单元格 D2 中的公式: =transpose('Form responses 1'!A4:BB4)

I would like the references to increase by row (vertically down) rather than by column (horizontally right) when I drag across to copy the formula.当我拖动以复制公式时,我希望引用按行(垂直向下)而不是按列(水平右侧)增加。

Second sheet:第二张: 第二张

As you can see in the first sheet, I am trying to TRANSPOSE data from the second sheet using said formula.正如您在第一张工作表中看到的那样,我正在尝试使用上述公式从第二张工作表TRANSPOSE数据。 However when I go to drag the formula across (horizontally) it references the column when instead I need it to reference the row (if I drag it downwards it works fine but that is not what I need in this particular case).但是,当我跨(水平)拖动公式时,它会引用该列,而我需要它来引用该行(如果我向下拖动它,它可以正常工作,但这不是我在这种特殊情况下需要的)。

I understand I need to implement a OFFSET function, something along the lines of: =transpose(offset('Form responses 1'!A$2:BB$2,COLUMNS($A$2:A2)-1,0))我知道我需要实现一个OFFSET函数,类似于: =transpose(offset('Form responses 1'!A$2:BB$2,COLUMNS($A$2:A2)-1,0))

I am unsure of what the last part would need to be, COLUMNS($A$2:A2)-1,0 , what should I change this to to get the desire result?我不确定最后一部分需要是什么, COLUMNS($A$2:A2)-1,0 ,我应该如何改变它以获得想要的结果?

If I have not explained thoroughly enough please let me know, thanks.如果我解释得不够彻底,请告诉我,谢谢。

Use arrayformula and you won't have to drag anything.使用 arrayformula,您将不必拖动任何东西。 Try:尝试:

=arrayformula(transpose('Form responses 1'!A$1:BB$4))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM