+ Reply to Thread
Results 1 to 8 of 8

Pivot table subtotals by Customer code

  1. #1
    Forum Contributor
    Join Date
    01-18-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    128

    Pivot table subtotals by Customer code

    Dear Gurus,
    How do I put subtotals in column K at each change of customer code?
    Thank you!

    I am working in 2003 and attached the spreadsheet in question.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Pivot table subtotals by Customer code

    One way is to put the following in K2:

    =SUMIF($A$2:$A$36,A2,$J$2:$J$36) and copy down
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Contributor
    Join Date
    01-18-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Pivot table subtotals by Customer code

    Quote Originally Posted by Søren Larsen View Post
    One way is to put the following in K2:

    =SUMIF($A$2:$A$36,A2,$J$2:$J$36) and copy down
    Hi Søren,
    This didn't seem to work. It just shows the number on the first row in each Customer Code group, so for CM5, it shows 69.55
    Any modification of this code?
    Thank you,
    Eva

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Pivot table subtotals by Customer code

    It should work... have a look at the attached:
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-18-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Pivot table subtotals by Customer code

    Quote Originally Posted by Søren Larsen View Post
    It should work... have a look at the attached:
    What if I want the result as a subtotal at each change of customer code? Now, it shows the subtotal three times. Thanks!

  6. #6
    Forum Contributor
    Join Date
    02-22-2011
    Location
    Rhône Alpes, France
    MS-Off Ver
    Excel 2007
    Posts
    201

    Re: Pivot table subtotals by Customer code

    Hi,
    See attached the pivot table with the amount in the sum value
    Parameters of Cust_Code > Layout and printing > Show items in outline form
    Activate the check box : Display labels next field in the same column and Display subtotals above each group
    Hope this helps and work for Execl 2003
    Best regards
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Pivot table subtotals by Customer code

    In that case, you can change the code to:

    =IF(A2<>A3;SUMIF($A$2:$A$36,A2,$J$2:$J$36) ,"")

    But then your codes have to be sorted consecutively.

  8. #8
    Forum Contributor
    Join Date
    01-18-2010
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Pivot table subtotals by Customer code

    Quote Originally Posted by Søren Larsen View Post
    In that case, you can change the code to:

    =IF(A2<>A3;SUMIF($A$2:$A$36,A2,$J$2:$J$36) ,"")

    But then your codes have to be sorted consecutively.
    Thank you!

+ 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