尝试在一个数组公式内嵌套一个转置公式。

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

Trying to nest a transpose formula inside an array formula

问题

Here's the sheet: https://docs.google.com/spreadsheets/d/1TbPKehggzCGWy6LyEuzHZc5RouBHhyju35bqIGpInhM/edit#gid=14120435

I know how to transpose the data in colA (=Transpose(A2:A)). I know how to write an array formula to output the data i'd like (F1), but I'd like to nest the Transpose formula into the formula in F1 so that as items are added to colA, the table on the right populates with the header rows relying on the values in A2:A and the data as it is in ColF

英文:

Here's the sheet: https://docs.google.com/spreadsheets/d/1TbPKehggzCGWy6LyEuzHZc5RouBHhyju35bqIGpInhM/edit#gid=14120435

I know how to transpose the data in colA (=Transpose(A2:A)). I know how to write an array formula to output the data i'd like (F1), but I'd like to nest the Transpose formula into the formula in F1 so that as items are added to colA, the table on the right populates with the header rows relying on the values in A2:A and the data as it is in ColF

答案1

得分: 0

你可以尝试以下代码:

=ARRAYFORMULA(LET(header,转换为行(A2:A,1),{header;IF(D2:D="","",E2:E*VLOOKUP(header,A:B,2,))})

或者:

=ARRAYFORMULA(LET(header,筛选(A2:A,A2:A<>""),{header;IF(D2:D="","",E2:E*VLOOKUP(header,A:B,2,))})
英文:

You could try:

=ARRAYFORMULA(LET(header,TOROW(A2:A,1),{header;IF(D2:D=&quot;&quot;,,E2:E*VLOOKUP(header,A:B,2,))}))

Or:

=ARRAYFORMULA(LET(header,TRANSPOSE(FILTER(A2:A,A2:A&lt;&gt;&quot;&quot;)),{header;IF(D2:D=&quot;&quot;,,E2:E*VLOOKUP(header,A:B,2,))}))

huangapple
  • 本文由 发表于 2023年2月18日 13:11:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/75491343.html
匿名

发表评论

匿名网友

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

确定