OFFSET公式修改

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

OFFSET Formula Modification

问题

我知道偏移公式的工作原理(例如=OFFSET($B$5,(ROW(A1)*n)-1,0))。但是,您能否建议如何修改它以获取从列B中获取第一个单元格(然后随着拖动它向下),从列C中获取第一个单元格,然后从列B中获取第二个单元格,从列C中获取第二个单元格,依此类推?

谢谢

英文:

I know how the offset formula (e.g. =OFFSET($B$5,(ROW(A1)*n)-1,0)) works. However, can you advise how to modify it to get 1st cell from column B (and then as I drag it down) first cell from C and then second cell from B and second cell from C, and so on?

Thanks

答案1

得分: 1

你可以尝试使用OFFSETMODROUNDUP函数的混合来获取不断变化的rowscols参数:

=OFFSET($B$1, ROUNDUP(ABS(ROW(A1)/2), 0)-1, MOD(ROW(A2), 2))

我在单元格B1:C6中包含了一些随机值,以更清晰地展示结果。

英文:

You can try using a mix of OFFSET, MOD and ROUNDUP functions to get an ever-changing mix of rows & cols parameters:

=OFFSET($B$1,ROUNDUP(ABS(ROW(A1)/2),0)-1,MOD(ROW(A2),2))

I included some random values in cells B1:C6 to present the result in a clearer way:

OFFSET公式修改

huangapple
  • 本文由 发表于 2020年1月3日 15:31:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/59574761.html
匿名

发表评论

匿名网友

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

确定