Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Trying to add up different values within a table - Excel 2007

Latest post Mon, Jun 28 2010 12:57 PM by Roger Govier. 3 replies.
  • Fri, Jun 25 2010 6:23 AM

    Trying to add up different values within a table - Excel 2007

    Hey all, 

     

    I am trying to add up a bunch of different date in a single table (file attached)

     

    I know that a pivot table can do it - but I would prefer to have a formula that looks in the "data" sheet and adds up per the variables in the "Report" tab.

     

    Thanks a million of the help.

    • Post Points: 52
  • Fri, Jun 25 2010 7:17 AM In reply to

    Re: Trying to add up different values within a table - Excel 2007

    Use

     

    =SUMPRODUCT((data!$E$2:$E$1200=Report!$A8)*(data!$B$2:$B$1200={"Sales Type 3","Sales Type 5","Sales Type 8"})*(data!$I$2:$I$1200))

    =SUMPRODUCT((data!$E$2:$E$1200=Report!$A8)*(data!$B$2:$B$1200={"Sales Type 1","Sales Type 2","Sales Type 4"})*(data!$I$2:$I$1200))

    =SUMPRODUCT((data!$E$2:$E$1200=Report!$A8)*(data!$B$2:$B$1200={"Sales Type 6","Sales Type 7"})*(data!$I$2:$I$1200))

     

    and copy down

    Regards

    Bob

    • Post Points: 5
  • Fri, Jun 25 2010 7:20 AM In reply to

    Re: Trying to add up different values within a table - Excel 2007

    You could also use

    =SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 3")
    +SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 5")
    +SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 8")

    =SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 1")
    +SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 2")
    +SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 4")

    =SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 6")
    +SUMIFS(data!$I:$I,data!$E:$E,Report!$A8,data!$B:$B,"Sales Type 7")

     

    and copy down

    Regards

    Bob

    • Post Points: 5
  • Mon, Jun 28 2010 12:57 PM In reply to

    • Roger Govier
    • Top 10 Contributor
    • Joined on Tue, Jan 8 2008
    • Abergavenny, South Wales, UK
    • Posts 149
    • Points 2,288
    • MVP

    Re: Trying to add up different values within a table - Excel 2007

    Hi

    You could also do it with a Pivot Table as with the file attached.
    I have also added Month and Country as Report Filter items to give you extra flexibility in choosing waht you want to report.

    Regards
    Roger Govier
    Microsoft Excel MVP

    • Post Points: 5
Page 1 of 1 (4 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.