문제

I have a table like so:

A   B   C   D
1   3   2   1
2   3   2   1
3   0   2   2

I want to vlookup the first column so that it returns the 3 columns after.

For example if I look up 2, i want the return to be 3 2 1.

i need it in one formula because it will go into a sumproduct expression.

Does not have to be a vlookup. I just need something that will return me an array though some type of indexing or lookup.

도움이 되었습니까?

해결책

One of the ways to achieve this is query. So for the data given by you (A, B, C are column), you can use the following formula to get all three columns for the lookup value 2

=QUERY($A$1:$D$3,"select B,C,D where A = 2")

Then you can apply any aggregate function on top of this too. For eg:

=sum(QUERY($A$1:$D$3,"select B,C,D where A = 1"))

Check this link

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top