+ Reply to Thread
Results 1 to 5 of 5

questions about how to conditionally calculate the sum

  1. #1
    Registered User
    Join Date
    03-01-2012
    Location
    los angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    questions about how to conditionally calculate the sum

    Hi everyone,

    I don't know how to put it in words, the probelem is i want to calculate the total amount for each store and for each transaction code on a mothly basis . Every month the sheet is different. But the format is the same. For example: the total of store 1 and code 1 is $1+$2=$3. but next month the number maybe different, maybe there will be more transaction 1 occur in store 1. So all i want is not a answer just for this example but a logic expression which can fit any change in this sheet, holding the basic format constant. Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: questions about how to conditionally calculate the sum

    Pivot Table is your friend on this one
    Attached Files Attached Files

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

    Re: questions about how to conditionally calculate the sum

    Another way is to set up a table on sheet 2, with Store in A, Transaction Code in B, Total in C. C2 and down has this formula: =SUMPRODUCT((Sheet1!$B$2:$B$21=A2)*(Sheet1!$D$2:$D$21=B2)*(Sheet1!$C$2:$C$21))
    Life is about perseverance. Remember: today's mighty oak tree is just yesterday's nut that held its ground.

    If you like a post, please rate it with the scales icon (top right).
    If you feel really indebted, please consider a donation to charity, such as Feed the Children or Habitat for Humanity.

  4. #4
    Registered User
    Join Date
    03-01-2012
    Location
    los angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: questions about how to conditionally calculate the sum

    JieJenn, Thank you for you reply! is there any one-step function? i am not familiar with Pivot table, and totally have no idea how to deal with it...

  5. #5
    Registered User
    Join Date
    03-01-2012
    Location
    los angeles
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: questions about how to conditionally calculate the sum

    Darkyam , thank you for your reply, is there any other way which i donot to set up another table?

+ 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