+ Reply to Thread
Results 1 to 8 of 8

Sum monthly sales for each outlet in a territory.

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Sum monthly sales for each outlet in a territory.

    I’ve 4 months of monthly cash sales for a product which is sold in various outlets which belong to specific territories. There are about 200 territories and multiple outlets in each territory. I’d like to sum the sales for each outlet within its territory and rank the outlets by the volume of sales in their territory.

    What do you think of the approach below, is it good, I’ve got that funny feeling im making hard work of it:

    List Unique Territories in Sheet(“Lists’”) column A
    List Unique Outlets in Sheet(“Lists”) in column B

    For each Territory in Sheet(“RawData”)
    For each Outlet in Sheet(“RawData”)
    Sum Sales in Sheet(“RawData”) and place Territory/Outlet/4 months sales figure in Sheet(“Results”)
    Next Outlet
    Next Territory

    Then rank the outlets by adding a column in Sheet(“Results”) with a score of 1 for the highest sales to 10 or greater (depending on number of outlets in the territory, which varies).

  2. #2
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Sum monthly sales for each outlet in a territory.

    Ive attached an example dataset
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Sum monthly sales for each outlet in a territory.

    If the areas and outlets are fairly static then the report can be accomplished with "=SUMIFS()

    If either areas or outlets constantly change in number then a macro solution is in order

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Sum monthly sales for each outlet in a territory.

    Try this:-
    Data on sheet "Data", results on sheet "Results".
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: Sum monthly sales for each outlet in a territory.

    Thanks Mick. Would you mind walking me through this as I find it a bit hard to follow with regard the scripting dictionary component and the use of arrays, its far removed from my usual sum ifs..

    Quote Originally Posted by MickG View Post
    Try this:-
    Data on sheet "Data", results on sheet "Results".
    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Sum monthly sales for each outlet in a territory.

    There is quite a lot of work to comment the code if you do not have a basic understanding of Arrays and Scip Dict".
    So have attached the below, relating to "Arrays" &"Scripting dictionaries"
    Hope that helps !!
    http://www.snb-vba.eu/VBA_Dictionary_en.html
    http://www.snb-vba.eu/VBA_Arrays_en.html
    Regrds Mick

  7. #7
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,458

    Re: Sum monthly sales for each outlet in a territory.

    Nice coding

  8. #8
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Sum monthly sales for each outlet in a territory.

    Thanks for the interest and the comment
    Regrds Mick

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sum monthly sales for each outlet in a territory.
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2017, 10:34 AM
  2. Replies: 6
    Last Post: 10-19-2013, 04:53 PM
  3. Replies: 2
    Last Post: 10-17-2013, 11:52 AM
  4. Replies: 7
    Last Post: 07-23-2013, 07:56 AM
  5. Replies: 2
    Last Post: 06-19-2012, 10:19 AM
  6. summarize monthly sales from daily sales
    By top1 in forum Excel General
    Replies: 4
    Last Post: 01-05-2010, 11:59 PM
  7. copy week total in weekly sales worksheet to appropriate week in monthly sales
    By Sandy2976 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2009, 01:04 PM

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