SUMS with reference within the array

Asked

Viewed 374 times

1

I would like to use the following formula::

=SUM(SUMS(A:A;B:B;{"car";"bicycle"}))

It turns out that I do not want to leave the criteria "car" and "bike" fixed, I would like to put in there a reference, as for example:

=SUM(SUMS(A:A;B:B;{G1;G2}))

But this operation is not accepted. How can I get around this impediment?

2 answers

0

Use the formula below, where "C1" and "D1" are the cells that should contain the dynamic values. After pasting the formula confirm with Ctrl+Shift+Enter, for being a vector formula.

=SOMA(SE((B:B=C1)+(B:B=D1);A:A))

0

Oops, try it like:

=SOMASES(A:A;B:B;G1)+SOMASES(A:A;B:B;G2)

which would be more or less: =SOMASES(A:A;B:B;"carro")+SOMASES(A:A;B:B;"bicicleta")

  • I need to put everything into one formula.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.