+ Reply to Thread
Results 1 to 14 of 14

Summing total per customer for each month

  1. #1
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Summing total per customer for each month

    Please see the attached example.

    I am working with Office 97 and I know that if I had Office 2007 this question could be easily answered with the "SUMIFS" function. But since Office 97 doesn't have that formula I need to find another way to accomplish what i am trying to do.

    In the gray boxes I need a formula that will sum the amounts for each customer for each month. For example, the total amount that shipped to customer A in October is 180.4.

    I will be applying this to a much larger amount of data, so please do not provide a formula that only works for the data supplied in this example. I will be continuously adding more info to my list over time and I want the count to automaticaly include the data when I enter it.

    Thank you!
    Attached Files Attached Files

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

    Re: Summing total per customer for each month

    Perhaps the attached will work.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Summing total per customer for each month

    It doesn't seem to be fully working, as for Customer A in October it should be 180.4 and November is 49.6.

    Custoemr B looks fine, but customer C should have 16.1 in October.

    Can you explain a little in words what the formula is doing?

    Thank you

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

    Re: Summing total per customer for each month

    Sorry about that. Didn't have the named ranges set right. Each named range starts off at row 6 of the column it's for. Index is used in the named range to create a reference that takes the row from cell 6 through however many records you have. In other words, for the named range Amount (=Sheet1!$A$6:INDEX(Sheet1!$A:$A,COUNT(Sheet1!$A:$A)+5)), it starts at A6, counts how many records there are (22) and then adds 5 since we skipped those five rows, making the reference A6:A27.

    The formula in the sheet itself compares the dates in ShipDate to the dates in column F and, if the cell below the row you're working on is 0, simply multiplies the results by 1 instead of checking to see whether there are dates after a given date. This is important because, if you had December dates in your table, but no 12/1/09 in your summary table, November would return those December records. The formula then checks the Customer list for the customer in Row 5 and, if the results of all three checks are TRUE (or 1), it adds up the corresponding amount in the Amount list.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Summing total per customer for each month

    OK I see how it is done. But instead of naming ranges, can I just tell the formula in the calculating cell a specific range (ie. C47:C2500, 2500 just a big number) or put a whole column in as the range, even if the column has a header and the info to be counted doesn't start until row 132?

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

    Re: Summing total per customer for each month

    You can't do whole columns, simply because it will try to do math on the headers and return a #VALUE! error. You can just put in large ranges if you want, starting with row 6. Just remember to confirm with Ctrl+Shift+Enter.

  7. #7
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Summing total per customer for each month

    OK thanks. One last question. I havent used Crtl+Shift+Enter before. What does it do?

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

    Re: Summing total per customer for each month

    It is used for array formulas. I honestly don't understand why the Microsoft developers couldn't have made the formulas work without them, but suffice it to say that for formulas such as this one (or others that have conditions or use functions meant for one cell on a range), you need to confirm it this way.

  9. #9
    Registered User
    Join Date
    06-19-2008
    Posts
    63

    Re: Summing total per customer for each month

    OK, I get it. Thanks again!

  10. #10
    Registered User
    Join Date
    11-03-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing total per customer for each month

    Would a pivot table not work using the group by function?

  11. #11
    Registered User
    Join Date
    11-03-2009
    Location
    Missouri
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Summing total per customer for each month

    See attached for an example using a pivot table
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    Re: Summing total per customer for each month

    I'd also suggest perusing the various threads on SUMPRODUCT.
    Using this function allowys for very distinct criteria

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

    Re: Summing total per customer for each month

    I actually tried that first, but for some reason, it wouldn't work when I tried to have it multiply by an array if there was a date for the next month in the summary table and by 1 if there wasn't.
    Last edited by darkyam; 11-05-2009 at 10:36 PM.

  14. #14
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Summing total per customer for each month

    In SUMPRODUCT terms (using the named ranges already configured)

    Please Login or Register  to view this content.
    For info. on Sumproduct & Arrays see links in sig.
    (SUMPRODUCT is in essence MS's Array function that does not require CSE to commit, ie it is processed like an array (an iteration of sorts))

    c_m_s_jr's point re: Pivots is however perhaps the most valid.

+ 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