1

I am facing a problem that seems trivial in Excel. What I need to do is simply this:

https://i.imgur.com/kxZlXeo.png

In short, I have a large file of prices linked to a few people and I need to know how much each person paid. I've tried things with VLOOKUP with not much success.

How can I accomplish this?

  • Welcome to Super User! Could you please edit your question to include the things you've tried with vlookup? It would help the others to answer your question. – Aulis Ronkainen Nov 21 '18 at 11:33
2

You need SUMIF() formula.

In your specific case =SUMIF(B$2:B$9;D4;A$2:A$9) will give you the sum for Name1 then paste it down for Name2 and Name3

Table

1

SUMPRODUCT function can help you get the result:

=SUMPRODUCT(($B$2:$B$9=E4)*($A$2:$A$9))

enter image description here

  • Nice one @Lee,, you get perfect 10 ☺ – Rajesh S Nov 22 '18 at 11:33

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.