Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top