+ Reply to Thread
Results 1 to 7 of 7

VB Code to summarize weekly Sales

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to summarize weekly Sales

    Hello:

    Please refer to attached file.

    I have 2 sheets called Sales and Weekday.
    As you can see Sales for Daily are shown in column L of Sheet "Sales".

    I need a VB Code to summarize by Weeknum and day of the week as shown in "Weekday" Sheet.
    Would need the Week Start Date and Weekend Date in column B and C.
    I have manually completed for week 1
    FY: My week start from Fri and ends on Thu.


    Let me know if you have any questions.
    Thanks.

    Riz
    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: VB Code to summarize weekly Sales

    Why not just go with formula.

    In E3 enter =SUMIFS(Sales!$L$3:$L$37,Sales!$A$3:$A$37,">="&B3,Sales!$A$3:$A$37,"<="&C3) and drag it down
    In F3 enter =SUMIFS(Sales!$L$3:$L$37,Sales!$A$3:$A$37,">="&$B3,Sales!$A$3:$A$37,"<="&$C3,Sales!$B$3:$B$37,F$2) drag it down and across
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VB Code to summarize weekly Sales

    FWIW:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to summarize weekly Sales

    Hi John:

    For some reason it seems not work.
    Please refer to attached file.
    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VB Code to summarize weekly Sales

    It works for me? Activate Sales and run it.

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to summarize weekly Sales

    Hi JieJenn:

    Looks like your solution will work great.
    i still need 1 more favor.
    I would i make column L variable so that i can choose which column i want to add.
    This way i can do multiple data study by choosing the column and see the data.
    Please Please let me know if you have any questions.
    Thanks.

    Riz

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

    Re: VB Code to summarize weekly Sales

    Just change the cell range reference. You have to do that also if you are going with VBA route.

+ 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. Summarize weekly Inventory
    By top1 in forum Excel General
    Replies: 9
    Last Post: 02-08-2010, 07:30 PM
  2. summarize monthly sales from daily sales
    By top1 in forum Excel General
    Replies: 4
    Last Post: 01-05-2010, 11:59 PM
  3. 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
  4. Summarize daily data into weekly average
    By agentred in forum Excel General
    Replies: 5
    Last Post: 01-19-2009, 06:48 AM
  5. [SOLVED] Summarize employee attendance data on a weekly basis
    By Hanr3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-05-2006, 12:00 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