+ Reply to Thread
Results 1 to 14 of 14

Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi Great Ones:

    Per the attached spreadsheet, I have 2 sheets one for summarizing data and the second for inputting data.

    In the Summary Data Sheet I need the following
    1. in Cell C6 and C7 - Production for report date (Date is in Cell A1)
    2. in Cell D6 and D7 - Production for previous date of report date
    3. in Cell E6 and E7 - Sum of 'Current' Week to Date (WTD) Production. Week Starts Sunday and Ends Report Date
    4. in Cell F6 and F7 - Sum of 'Previous' Week to Date Production. If Report Day is Wednesday, then The sum should be from Sunday to Wedensday of previous week
    5. in Cell G6 and G7 - Sum of 'Current' Month to Date (MTD) Production. Month Starts First of the Monteh and Ends Report Date
    6. in Cell H6 and H7 - Sum of 'Previous' Month to Date Production. Month starts First Date of Last month and Ends Same Date as Reports date but for last month
    7. in Cell I6 and I7 - Sum of 'Current' Quarter to Date (QTD) Production. Quarter Starts First of January or April or July or October (as applicable) and ends with the report date of that quarter
    8. in Cell J6 and J7 - Sum of 'Previous' Quarter to Date Production. Starts last quarter and ends same date as per report date but for last quarter
    9. in Cell K6 and K7 - Sum of 'Current' Year to Date (YTD) Production. Year Starts from April 01 of this year and Ends on Report Date
    10. in Cell L6 and L7 - Sum of 'Previous' Year to Date Production. Year Starts April 01 of last year and ends on the same date as per report date but for last year. So the cell total should be sum of values from April 01 2013 to Sept 17 2013

    Many thanks in advance and appreciate your time for taking pains to resolve my dilemma

    Thanks again
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi,

    Whilst you can get the information you want with a mixture of INDEX() & Match() functions, and using a helper column to strip out the name of the Mill on both sheets, you are making a whole load of work for yourself.

    You are making the same mistake that I see time and time again. You are mixing up the two elements of data capture and final reporting. The two require quite different treatments.

    A lot of people start by designing the form that they expect to see as the final report, and then wonder why it's so difficult to subsequently analyse and summarise or extract information from it, Yours exhibits all those features.

    You should always capture data in a simple two dimensional table and worry about reporting information from it afterwards. Without exception doing this you will always be able to easily obtain management information. Rarely is this the case if you start the other way round.
    You will also throw open the whole wonderful world of the powerful Pivot table functionality.

    In this case your input sheet should contain columns for
    Date
    Mil Name
    UOM
    Production numbers.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi Richard:

    Thank you for your detailed response, but trust me if I was able to use the pivot or power pivot functionality of EXCEL, I would have not posted this question. The attached spreadsheet is really a very simplified one line item data for input. However, the 'total' production for each mill comprises of many finished goods and then we have over 160 (rows) line items to report per the attached format for columns.

    I was able to extract the report date and the previous date production numbers using the index and match function, however, am getting a mental block in getting the sum for WTD, MTD etc

    Any help in this direction would be greatly appreciated.

    Thanks again
    Last edited by jubiesxl; 09-20-2014 at 06:17 AM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi,

    There seems an apparent contradiction but no doubt you can clarify. Your original contained two data rows showing two different mills. From that I implied that you were looking to pick a particular singular statistic for a particular mill for a particular day. Hence my mention of Index & Match - which you confirm you have tried.

    However now you are mentioning that any one mill might have many rows which you need to sum. Consequently Index/Match or Lookups will not work since they essentially find a single value somewhere.

    I agree that you can't use a PT with your current layout, which is why I suggested that you need to change to the layout I mentioned. Without this you will need either some VBA macros or possibly some very complex horrid array formulae.

    Believe me, I've got too many T shirts to think otherwise, turning the layout around and using a PT is the most efficient way forward.

  5. #5
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi Richard:

    My original data was a two line input data to ensure that I do not complicate my needs to my peers. The actual input data would be about 600 rows tall, which will be summarized in 160 rows in the summary sheet as per the attached spreadsheet for the WTD, MTD QTD and YTD.

    Could you please please provide me with Excel or VBA solution to calculate my date specific needs for the WTD, MTD, QTD and YTD sum for the 2 reporting years

    Thank you for your suggestion regarding PT, but it does not work in this case especially since my needs have 160 items to be included in the report of which first 2 columns for the current date and previous days numbers are cherry picked (using Index/Match function) and the rest (WTD, MTD, QTD, YTD) is sum of values for the respective dates. And as I said in my previous post that I am not able to get the sum of values between two dates

    Thanks again
    Last edited by jubiesxl; 09-22-2014 at 08:09 AM.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Quote Originally Posted by jubiesxl View Post
    Hi Richard:


    Thank you for your suggestion regarding PT, but it does not work in this case especially since my needs have 160 items to be included in the report of which first 2 columns for the current date and previous days numbers are cherry picked (using Index/Match function) and the rest (WTD, MTD, QTD, YTD) is sum of values for the respective dates. And as I said in my previous post that I am not able to get the sum of values between two dates

    Thanks again
    Forget the need to summarise 600+ rows into 160 rows. Whether you have 600,000 rows or 60 it doesn't matter to a pivot table.

    Are you saying that it is impossible to change your Input sheet into a layout which is compatible with a pivot table? I ask since Index Match functions (where there are many rows for the same Mill) will not cut it. They merely return a single value. My original post was made under the impression that you were looking to find a single row on the input sheet for each mill. As a minimum you will need some array formulae with specific criteria and you may well find the calculating time really slows down.

    Believe me, if the layout of your data is changed you could create a pivot table in a matter of seconds and not need to worry about formulae.

    VBA would be the proverbial sledgehammer to crack the proverbial nut.

  7. #7
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Thank you Richard for your help and advice. I sincerely appreciate your time for detailed explanation.

    However, I do believe I need to put the daily numbers and the summing values (of wtd, mtd, etc) within the same report which is why PT is not advisable in this case.

    Outside the PT could you please provide me a direction how to reference and sum the select columns for say a week or month and from there I will pick up my speed

    Any suggestions by other peers would be of great value.

    Thanks again

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Quote Originally Posted by jubiesxl View Post
    Thank you Richard for your help and advice.

    However, I do believe I need to put the daily numbers and the summing values (of wtd, mtd, etc) within the same report which is why PT is not advisable in this case.


    Thanks again
    ..that's the difficulty I'm having in understanding why you believe that. Largely because it isn't correct. That's precisely what a PT does.

    If I could understand why you believe that, and I mean believe that and show me specific examples why a PT wouldn't work rather than just a simple statement that you "believe", then I can maybe answer your fears.

  9. #9
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi Richard:

    My biggest fear in using PT is that I need to create 10 PT and then consolidate to get my summary report. And going forward run Pivot again every day for the reporting date to update the data. Also we need to manipulate manually the dates on each of the 10 PT for the report dates. Please do correct me if I am wrong. I would please prefer to have a simpler excel or vba solution to calculate the sum to dates.

    I guess I am missing a trick in PT and was wondering if you can please show how I can Pivot the data to report values
    - of the report day
    - the previous date of report date

    - Then in the same report have a summation of weekly data (only upto the report date) Week starts Sunday and ends Saturday, but if the report date is Wednesday then the Pivot should sum the values only from Sunday to Wednesday

    - Again the corresponding data for the previous week

    - Similarly for the current MTD, previous MTD (based on the date not the day) and so on for QTD and YTD.

    Thank you very much

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi,

    See attached.

    Even ignoring a Pivot Table the data needs to be in the format I show on the data sheet in order to facilitate the use of the SUMIFS() formulae you see in the summary table in K1:Q12

    Change the Report date in the yellow M3 cell on the Data tab.
    Attached Files Attached Files

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi,

    See attached.

    Even ignoring a Pivot Table the data needs to be in the format I show on the data sheet in order to facilitate the use of the SUMIFS() formulae you see in the summary table in K1:Q12

    Change the Report date in the yellow M3 cell on the Data tab.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Awesome help Richard....I am smiling and happy ...Thank you very much for your suggestion and your time.

    Sincere Thanks

  13. #13
    Registered User
    Join Date
    12-15-2013
    Location
    Vadodara,Gujarat,INDIA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Hi Jubiexl,

    I was looking for a similar sheet to extract YTD data for production volumes. My only question is how can the capacity utilized by more than 100% ( what is significance of dividing it by 160?)

    Can u clarify please? will help me a lot

    Thanks,

  14. #14
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need Sum total for Week to Date, Previous Week to Date , Month to Date and ....

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ 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. calculating month to date, year to date, week to date
    By labogola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2014, 05:21 AM
  2. Replies: 1
    Last Post: 12-15-2011, 05:32 AM
  3. First date in Week of month selected (not first date of month)
    By thart21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-24-2011, 08:59 AM
  4. week start date and end date based on week number
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 12:39 PM
  5. Formula Help - Calculating Previous Week End Date
    By abrva in forum Excel General
    Replies: 2
    Last Post: 08-21-2008, 08:54 AM

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