A formula that returns a cell value using the data (number) of a cell in a specific column as the row number in another column

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

A formula that returns a cell value using the data (number) of a cell in a specific column as the row number in another column

问题

number data data result
1 q q
4 w r
2 e w
3 r e
5 t t
英文:
number data data result
1 q q
4 w r
2 e w
3 r e
5 t t

A formula that returns a cell value using the data (number) of a cell in a specific column as the row number in another column

I want to use the number in a cell in column A as the row number in column B and return that value in column C. <br> I was hoping this formula would work. But it failed..
=ARRAYFORMULA(INDEX(A:A,index(B:B)))

答案1

得分: 2

=INDEX(XLOOKUP(A:A,SEQUENCE(ROWS(A:A)),B:B,))

英文:

You can try:

=INDEX(XLOOKUP(A:A,SEQUENCE(ROWS(A:A)),B:B,))

A formula that returns a cell value using the data (number) of a cell in a specific column as the row number in another column

答案2

得分: 2

使用 MAP()BYROW() 函数。尝试 -

=MAP(A2:A6,LAMBDA(x,INDEX(B2:B,x)))

要使输入列具有动态性,可以使用 -

=MAP(A2:INDEX(A2:A,COUNTA(A2:A)),LAMBDA(x,INDEX(B2:B,x)))

英文:

Use MAP() or BYROW() function. Try-

=MAP(A2:A6,LAMBDA(x,INDEX(B2:B,x)))

To make input column dynamic, use-

=MAP(A2:INDEX(A2:A,COUNTA(A2:A)),LAMBDA(x,INDEX(B2:B,x)))

A formula that returns a cell value using the data (number) of a cell in a specific column as the row number in another column

huangapple
  • 本文由 发表于 2023年2月6日 17:00:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75359202.html
匿名

发表评论

匿名网友

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

确定