1

I have a list of families invited to my wedding, formatted like this

Name  | Who invited  | How much will come? 
------------------------------------------
Johes | Bride        | 2
Smits | Groom        | 3
...

And I want to add two cells that will come totals for "How much will come?" for Bride and for Groom separately. Is there any way to do this using formulas?

0

The following formula will do that.

Formula

=QUERY(A1:C3, "SELECT A, SUM(C) GROUP BY A PIVOT B")

Screenshot

enter image description here

1
  • 1
    This is just awesome! Almost SQL. Actually I wanted totals to split costs, so what I needed was "SELECT A, SUM(C) GROUP BY A", but thanks for showing me that QUERY function.
    – Bunyk
    Jun 22 '17 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.