Sum cells based on the value of other cell











up vote
1
down vote

favorite












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?










share|improve this question
























  • 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 at 11:33















up vote
1
down vote

favorite












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?










share|improve this question
























  • 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 at 11:33













up vote
1
down vote

favorite









up vote
1
down vote

favorite











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?










share|improve this question















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?







microsoft-excel worksheet-function cells






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 12:30









Anaksunaman

5,11321222




5,11321222










asked Nov 21 at 11:19









Adrien_p

61




61












  • 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 at 11:33


















  • 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 at 11:33
















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 at 11:33




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 at 11:33










2 Answers
2






active

oldest

votes

















up vote
2
down vote













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






share|improve this answer




























    up vote
    1
    down vote













    SUMPRODUCT function can help you get the result:



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


    enter image description here






    share|improve this answer





















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











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377251%2fsum-cells-based-on-the-value-of-other-cell%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    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






    share|improve this answer

























      up vote
      2
      down vote













      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






      share|improve this answer























        up vote
        2
        down vote










        up vote
        2
        down vote









        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






        share|improve this answer












        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 at 11:30









        Kevin Anthony Oppegaard Rose

        571311




        571311
























            up vote
            1
            down vote













            SUMPRODUCT function can help you get the result:



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


            enter image description here






            share|improve this answer





















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















            up vote
            1
            down vote













            SUMPRODUCT function can help you get the result:



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


            enter image description here






            share|improve this answer





















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













            up vote
            1
            down vote










            up vote
            1
            down vote









            SUMPRODUCT function can help you get the result:



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


            enter image description here






            share|improve this answer












            SUMPRODUCT function can help you get the result:



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


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 22 at 8:53









            Lee

            79917




            79917












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


















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
















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




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


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1377251%2fsum-cells-based-on-the-value-of-other-cell%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa