+ Reply to Thread
Results 1 to 8 of 8

Formula to consolidate weekly data

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

    Formula to consolidate weekly data

    Hello:
    Please refer to attached file.
    I have data as shown for 3 years 2014.2016 and 2016 in column D,G and J.
    I need formula to summarize weekly data for each year in column N,O and P, week starts Sun and ends on Sat

    Let me know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Formula to consolidate weekly data

    Using this formula:
    Please Login or Register  to view this content.
    Note this approach may require a re-alignment of your columns (vertically) depending on how you want the figures to appear visually. I'm sure there are other / better ways of accomplishing your goal.
    Attached Files Attached Files

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

    Re: Formula to consolidate weekly data

    Hello Logit:

    Your formula works but I really need to compare weekly sales side by side for each year/
    I wonder if this can be done by PIVOT Table.
    Please help
    Riz

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Formula to consolidate weekly data

    Without a pivot table (I'm not very good with them yet) .... here is a manual method copying the cell contents over and aligning the columns

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-08-2016
    Location
    USA
    MS-Off Ver
    Office 365, Office 2016 for PC & Mac, Office 2013, Office 2011 Mac
    Posts
    80

    Re: Formula to consolidate weekly data

    Hi rizmomin,


    I attached a pivot table that analyzes sales by week number for 2014, 2015, and 2016. I changed the data format a bit to make it easier to work with. Also, I added in the formula =weeknumber(date) to group the weeks Sun-Sat in the pivot table..

    DMG
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,354

    Re: Formula to consolidate weekly data

    In N2

    =SUMPRODUCT((INT((B$2:B$367-WEEKDAY(B$2:B$367)-DATE(YEAR(B$2:B$367),1,1))/7)+2=$M2)*1,D$2:D$367)

    in O2

    =SUMPRODUCT((INT((E$2:E$367-WEEKDAY(E$2:E$367)-DATE(YEAR(E$2:E$367),1,1))/7)+2=$M2)*1,G$2:G$367)

    in P2

    =SUMPRODUCT((INT((H$2:H$367-WEEKDAY(H$2:H$367)-DATE(YEAR(H$2:H$367),1,1))/7)+2=$M2)*1,J$2:J$367)

    WEEKNUM cannot be used with ARRAY formulae so ned to use the above to determine week.

    Alternative is to add columns alongside to dates with =WEEKNUM(date) then use

    =SUMPRODUCT((D$2:D$367)*(weeknumcolumn=$M2))

    COLUMN K has sample for 2014

    =SUMPRODUCT((D$2:D$367)*(K$2:K$367=$M2))
    Attached Files Attached Files

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to consolidate weekly data

    I think that taking the dates columns to another sheet will simplify this task.
    Formula used on Sheet2 to copy date columns:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    With Week number list in Col K from 1 to 53
    Enter formula in L2 and copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Formula to consolidate weekly data

    Hello ALL:

    Great help, thanks to all, i have lots of choices.
    Thanks
    Riz

+ 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. [SOLVED] Formula to consolidate data
    By rizmomin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-16-2016, 10:59 AM
  2. Formula to consolidate yearly data
    By rizmomin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-13-2016, 03:02 PM
  3. Formula to convert monthly data into weekly data - help needed
    By dobrica3 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-12-2016, 10:00 AM
  4. [SOLVED] Converting daily data into weekly and making the weekly number a cumulative return
    By Duchess1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-28-2015, 10:23 AM
  5. Replies: 1
    Last Post: 07-17-2014, 12:01 PM
  6. Consolidate weekly Employee Hours
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2011, 09:41 AM
  7. Consolidate of data using formula in Excel
    By ims in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-28-2005, 01:10 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