+ Reply to Thread
Results 1 to 5 of 5

How to make a sum equation under multi sorting

  1. #1
    Registered User
    Join Date
    03-22-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to make a sum equation under multi sorting

    Year Client Fruit Type Categories Sales Amount
    2009 Market 1 Apple Fresh Alan $5.00
    2009 Market 1 Orange Frozen Susan $3.30
    2008 Market 2 Orange Fresh Alan $5.00
    2007 Market 3 Apple Fresh Sue $7.00
    2010 Market 2 Pineapple Frozen Tom $8.80
    2009 Market 1 Strawberry Fresh John $4.50
    2008 Market 1 Strawberry Frozen John $4.50
    2010 Market 1 Strawberry Fresh John $4.50

    I have an excel worksheet as above (or please see the attachment), I was wondering if it is possible to sum the amount without using VB under the folllowing condition :

    1) Year (2009) + Fruit Type( Orange) + Sales(John) ,
    2) Year (2009) + Fruit Type( Orange) + Categories (Fresh) + Sales(John) ,

    Many thanks in advance
    John
    Attached Files Attached Files
    Last edited by macjunior; 03-22-2010 at 02:39 AM.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: How to make a sum equation under multi sorting

    In the future, it's best to post a workbook rather than a screen shot.

    That being said, you can use Sumproduct.
    =Sumproduct((A2:A9=2009)*(C2:C9="Orange")*(E2:E9="John"))

  3. #3
    Registered User
    Join Date
    03-22-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to make a sum equation under multi sorting

    Quote Originally Posted by darkyam View Post
    In the future, it's best to post a workbook rather than a screen shot.

    That being said, you can use Sumproduct.
    =Sumproduct((A2:A9=2009)*(C2:C9="Orange")*(E2:E9="John"))
    Thanks darkyam for the reply.

    However, I think I didn't make myself clear. Actually, I would like to use formula to get the total amount (sum of column F) where Column A is set to "2009" + Column C is set to "Orange" + Column E is set to "Susan".

    Thanks again.
    John

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: How to make a sum equation under multi sorting

    =Sumproduct((A2:A9=2009)*(C2:C9="Orange")*(E2:E9="John")*(F2:F9)

  5. #5
    Registered User
    Join Date
    03-22-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to make a sum equation under multi sorting

    Quote Originally Posted by darkyam View Post
    =Sumproduct((A2:A9=2009)*(C2:C9="Orange")*(E2:E9="John")*(F2:F9)
    Thanks again darkyam, I really appreciate it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1