+ Reply to Thread
Results 1 to 64 of 64

Summary of daily data based on different criteria

  1. #1
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Question Summary of daily data based on different criteria

    This was posted on VBA forum but, not received any solution.

    Dear experts,
    I have attached here an excel work sheet.
    Let me describe how this works;
    >> this work sheet contains "sheet tabs" for each day and items/styles running in the production line.
    >> Production lines are named as A1, B1 etc, and one item/style runs in a particular day.
    >> The production time/duration of an item/style varies (it can be 1,2,3,5, 10,15, or any number of days depending on the order qty and daily targets/achievement.
    >> A production line can have more than one/two/three or more items/styles in a month. But, each item/style has different names.
    >> A month can start from any day and end in the same way, and this work sheet includes only the days factory worked.
    >> The sheet tabs has some formulas in some columns/cells
    >> End of the month, we prepare an item/style wise summary adding the daily information recorded on the sheet tabs.
    >> This kind of work sheets are used for different factory locations (currently, I have 6 factory locations whose daily data are recorded on this kind of a work sheet)

    Summary making process is time consuming and gives rise to a lot of MANUAL CALCULATION ERRORS.
    I need your support to summarize daily data in to a sheet called "Style Wise Summary" using a VBA macro program.

    The Style Wise Summary has different column labels which are self explained

    ** Columns that are in "BLUE", has the item/style basic details and these information repeat every day till the end of the style/item
    ** Column "I & K" should calculate the cumulative, but should be shown as an "average" as per the number of "days" style/item runs
    ** All "RED" columns should calculate the "cumulative/totals" of the given criteria.
    ** In the Summary report, all items produced in a particular line (A1, B1 etc) should be shown in the rows one below the other as per the order of progression.

    Pls ask me if you need any more information.

    Thanks in advance.
    Last edited by Anuru; 05-17-2018 at 12:08 PM.

  2. #2
    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
    30,925

    Re: Summary of daily data based on different criteria

    People may have deemed this to large a project (to do unpaid) so maybe contact "Commercial Services"
    Last edited by JohnTopley; 05-17-2018 at 04:23 AM.

  3. #3
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    People may have deemed this to large a project (to do unpaid) so maybe contact "Commercial Services"
    Hi John,
    Okay, I will try to contact commercial services.

  4. #4
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Hi John,
    I purchased points, but don't know how to post this on to commercial services. Can you help me to pls how to do that..

  5. #5
    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
    30,925

    Re: Summary of daily data based on different criteria

    Further points:

    Please remove commercially-sensitive information from your file e.g customer names.

    And post a file with say 3 sheets AND show some expected results ( 6 or 10 rows will do).

    I don't know to contact Commercial Services but will try and finfd out how this is done.
    Last edited by JohnTopley; 05-17-2018 at 06:31 AM.

  6. #6
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Summary of daily data based on different criteria

    Good morning Anuru

    You purchase points from here : http://www.excelforum.com/payments.php

    You post your question here : https://www.excelforum.com/commercial-services/

    I believe that you cannot access the commercial board until you have bought some points. You should be able to get to the commercial sub-forum from either the link above, or looking for the "Commercial Services" section about half way down the Excel Forum home page.

    Please post back if you cannot get on.

    HTH

    DominicB
    Last edited by dominicb; 05-17-2018 at 07:10 AM.

  7. #7
    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
    30,925

    Re: Summary of daily data based on different criteria

    Anuru,
    I have a solution but need you to define the various average calculations.

    Plus I suggest putting the month on the "Style Wise summary" sheet so it can be used to select the month(ly) data sheets.

    AND please remove the merged cells at the bottom of each data sheet as I need column A to be blank (other than line IDs) so I can determine the number of entries in each tab. This is "bad" practice and should be avoided.

    John
    Last edited by JohnTopley; 05-17-2018 at 10:59 AM.

  8. #8
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I ma working on the work sheet now..pls wait...

  9. #9
    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
    30,925

    Re: Summary of daily data based on different criteria

    I just need the AVERAGE calculation: everything else looks OK.

  10. #10
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Plus I suggest putting the month on the "Style Wise summary" sheet so it can be used to select the month(ly) data sheets.

    I added a month column before line nos, and I would like to have the last date of the month on that.

    AND please remove the merged cells at the bottom of each data sheet as I need column A to be blank (other than line IDs) so I can determine the number of entries in each tab. This is "bad" practice and should be avoided.

    un merged all, and I have put comments on the cells for all the calculation types..also removed sensitive data..
    Last edited by Anuru; 05-18-2018 at 05:52 AM.

  11. #11
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Also, it doesn't matter if "line nos" show in front of every item/style..

    I have attached with the change...

  12. #12
    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
    30,925

    Re: Summary of daily data based on different criteria

    Please Login or Register  to view this content.
    Sheet "Data" is an extract of data from all the sheets (do NOT delete this sheet)
    Last edited by JohnTopley; 05-18-2018 at 02:26 AM.

  13. #13
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Hi John, it looks great and highly appreciate your hard work. I will take some time to check for any issues.

    A few things I want to know;

    >> I am going to use this program when each factory sends me the final shet (end of the month). In this case, what should I do? I mean, can I simply copy the macro to " summary sheet"? then will it work without any issue?
    >> Does the "run" button work on both "summary sheet" and "data" sheet" when it is clicked?
    >> Do I need to change anything when the a "new month" (ex: June, July etc.) data to be analyzed? Because, we create "a new work sheet" for each month, starting from first day of the month.
    >> Can I add more rows(depending on the necessity) to the "daily record update sheets"? and what if I delete rows from the "daily data update sheets"

  14. #14
    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
    30,925

    Re: Summary of daily data based on different criteria

    Code is installed in "Module1": instructions below (for EACH workbook)

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
    [B][I]


    RUN button does everything. Ensure there is a "Data" tab in each workbook.

    Month is in cell A1 (as per sample). Just change this BUT it must the same as on the tabs. I recommend you use "Jan","Feb" etc as the months


    You can/add delete rows at will BUT do NOT put any other data below those data columns: it is bad practice.


    AND as previously requested, PLEASE remove all confidential data from files posted to this forum. I would remove all the files you have posted on this thread. I will remove the ones I posted.

  15. #15
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I followed your instruction and used the code for another work book, but it didn't work properly.
    I have little knowledge about macro work outs.

    By the way, I also have few questions;

    >> Do I need to copy and paste the "Page format" also in the new work book? , I mean column labels, colors, fonts etc..?
    >> Should the "Data" tab always be at the end of the work sheets? and "Style Wise Summary" sheet in the same location?
    >> "do NOT put any other data below those data columns: it is bad practice",..which data columns do you mean?

    I have attached the work book I tried out, pls let me know the mistakes I have done.

  16. #16
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    One more question;
    What if I move "all the data tabs" of of other work books to this VBA modue, without trying to insert macro to each work book?

    I can delete all the tabs leaving only "Style Wise Summary" and "Data" tabs in the VBA macro module(original module), and insert all the data tabs of a different work book in between...will it work??

  17. #17
    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
    30,925

    Re: Summary of daily data based on different criteria

    It will work: if you select a month in A1 then it will work on all tabs which contain that name so you could have all months in one workbook.

    Change one of the May tabs to JUN e.g "3 May" to "3 Jun" , change A1 to Jun and then click "RUN".

  18. #18
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    It will work: if you select a month in A1 then it will work on all tabs which contain that name so you could have all months in one workbook.

    Change one of the May tabs to JUN e.g "3 May" to "3 Jun" , change A1 to Jun and then click "RUN".
    I deleted the sheet tabs leaving only "style wise summary" and "data" tabs in the macro enabled module and inserted sheet tabs from a different work book in between, and ran the macro. However, it didn't change the data in the "style wise summary", but some data seemed to have change in the "data" sheet tab.

    Also, it gives error code "1004"...

    I have attached the work sheet I tried out..
    Last edited by Anuru; 05-18-2018 at 05:26 AM.

  19. #19
    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
    30,925

    Re: Summary of daily data based on different criteria

    You totally ignore that I said there was to no data in column A or merged cells.

    The problem is simple due to "corrupt" data which also appeared to have corrupted "Data" : I had to unmerge in all sheets.

    I also note there are empty sheets which I do not test for as I assumed there always be data and only lines used would appear in column A.

    AND you still post files with confidential data.

    Clean up your data.

  20. #20
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I was stupid not to see the merged cells hidden at the bottom of the sheet. I un merged all and deleted information on the column A. Now It worked. By the way, what if there is an empty row in the sheet tabs (daily data tabs)?

  21. #21
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Hi John, I am getting some "warning" when I save the document..pls advise ..attached the screen shot...
    Attached Images Attached Images

  22. #22
    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
    30,925

    Re: Summary of daily data based on different criteria

    I have amended to code to ignore the empty tabs in the "Data" sheet: See attached. I have also changed the customer names.

    Please Login or Register  to view this content.

  23. #23
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I have noticed two issues in the "Style Wise Summary" sheet

    >> Number of days run of the style AWS-9036MN should be the number of "calendar days" (ex: 3 may, 4 may, 5 may...15 may..etc) of the particular month. Accordingly, this style has run 10 days in the month of May.

    I think here, the macro considers "the first entry" of the style.

    >> Secondly, you may see this AWS-9036MN again appears under the same line with some different value for the "number of days run". Pls look in to this..

    This was noticed as per the last work sheet (test mod)..

  24. #24
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I would like "Number of Days Run" to be the number of "calendar days" the particular style has run in that "particular month". The reason, is I need to calculate the Loss and profit of the style "based on the number of days" that particular style has run in the particular month.

  25. #25
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by Anuru View Post
    I have noticed two issues in the "Style Wise Summary" sheet

    >> Number of days run of the style AWS-9036MN should be the number of "calendar days" (ex: 3 may, 4 may, 5 may...15 may..etc) of the particular month. Accordingly, this style has run 10 days in the month of May.

    I think here, the macro considers "the first entry" of the style.

    >> Secondly, you may see this AWS-9036MN again appears under the same line with some different value for the "number of days run". Pls look in to this..

    This was noticed as per the last work sheet (test mod)..
    I found why the same style appearing two times; it happens when there are blank rows under a style whose "customer" information is mentioned/selected. Also it happens only when the "same customer name" is mentioned in a blank row.

  26. #26
    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
    30,925

    Re: Summary of daily data based on different criteria


  27. #27
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    However this duplicating happens only once, for example, if there are "two blank rows" whose customer names are mentioned, it doesn't duplicate two times, instead it appears only one more time only. When the customer name is deleted from the blank row, it doesn't duplicate.

  28. #28
    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
    30,925

    Re: Summary of daily data based on different criteria

    Where are these errors: I cannot see any summary.

  29. #29
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I have attached here the work book to see how the duplicating happens. In the 3 May, I have added two blank rows whose customer name has been selected. Now, you can see in the Style Wise Summary, AWS-9036MN appears two times.

    However, this can be sorted out by myself by not leaving any blank rows with the customer name selected. (attached the sheet)

    I need a solution only now for the "Number of Days run".

    This is my requirement
    I would like "Number of Days Run" to be the number of "calendar days" the particular style has run in that "particular month". The reason, is I need to calculate the Loss and profit of the style "based on the number of days" that particular style has run in the particular month.

    Accordingly, AWS-9036MN has run 10 days in the month of May. However, style wise summary shows a different value.

  30. #30
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Also, I have noticed another issue in the column "W of" the "Style wise Summary".
    Actually, in the column "Total Losses" should count the values in column "Z". The logic should be the same as columns K, M, N, O, P, Q etc..
    Total losses doesn't mean the "cumulative losses" of all the styles..

  31. #31
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by Anuru View Post
    Also, I have noticed another issue in the column "W of" the "Style wise Summary".
    Actually, in the column "Total Losses" should count the values in column "Z". The logic should be the same as columns K, M, N, O, P, Q etc..
    Total losses doesn't mean the "cumulative losses" of all the styles..
    I saw, the columns J, L and T (average value columns) have the same issue. I meant "cumulative average" only of that style as per the number of days run. All averages should be only the average according to the number of days those styles were run in a particular line.

  32. #32
    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
    30,925

    Re: Summary of daily data based on different criteria

    Updated: I added logic to remove "blank" lines from "Data" (as your data collection is so variable)

    I will post code when you confirm it is OK.
    Attached Files Attached Files

  33. #33
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    I checked the work sheet, and seems ok as per my requirement.
    However, still column W(total losses) of "style wise summary" not corrected. It should also follow the same logic as in columns M, N, O, P, Q etc...Pls re look at it...

  34. #34
    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
    30,925

    Re: Summary of daily data based on different criteria

    You should be able to calculate with formula from columns U & V ????

  35. #35
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    You should be able to calculate with formula from columns U & V ????
    No John, this column should also follow the logic of M, N, O, P Q etc (total values). A formula is not necessary, because the details are captured from daily data sheets (same as total production, total working hours etc). The Column Z is the target column from the daily sheets. Normally, this doesn't include losses daily basis, it include losses only if they occurs.

  36. #36
    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
    30,925

    Re: Summary of daily data based on different criteria

    See attached updated:
    Attached Files Attached Files

  37. #37
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Hi John,
    I think now everything is working fine.
    Just one more help is needed for the following req.

    >> There is a column wise summary in every "daily sheet tab" in the row no 24 of every sheet. Also, there is a "Daily Summary" sheet tab which summarize this information in the row 24 of each sheet. Currently, I do this manually by copying required fields from row 24 to daily summary sheet as per the date. I transfer only the information highlighted in RED from row 24 to the daily summary sheet. There are some other columns that we have to manually fill, and formulas are not required for them.

    Can you please provide me some formulas to do this?
    Attached Files Attached Files

  38. #38
    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
    30,925

    Re: Summary of daily data based on different criteria

    TRY

    in B2

    =IFERROR(INDEX(INDIRECT("'" & TEXT($A3,"D")&"-" & TEXT($A3,"mmm") &"'!$A$24:$Z$24"),,MATCH('Daily Summary'!B$2,INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$A$3:$Z$3"),0)),"")

    Copy across and down
    Attached Files Attached Files

  39. #39
    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
    30,925

    Re: Summary of daily data based on different criteria

    You have 2 "Profit and Loss" on the Daily sheets but only one on the Daily Summary.

    NOTE: it is necessary for column headings in the Daily Sheets and the Daily Summary sheet to match.

  40. #40
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    You have 2 "Profit and Loss" on the Daily sheets but only one on the Daily Summary.

    NOTE: it is necessary for column headings in the Daily Sheets and the Daily Summary sheet to match.
    Yes John. The reason is Profit / Loss Status (BE) which is in column "Z" is just an extra information that this company doesn't have any interest, but in other cases, this is very much essential.

    Therefore, I keep only the "Profit / Loss Status (CM). But, I develop these sheets based on common industry norms so that I may use them in other cases.

    If you need the column heading to match, no problem you may change as required pls.
    Last edited by Anuru; 05-18-2018 at 12:24 PM.

  41. #41
    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
    30,925

    Re: Summary of daily data based on different criteria

    So do you want "Profit / Loss Status (CM)" in the Daily Summary??

    If so, change heading in "Daily Summary"

    And change spelling of "Efficiency" w/book wide!

  42. #42
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    oK, wait pls..I will change and send it again...

  43. #43
    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
    30,925

    Re: Summary of daily data based on different criteria

    No need to re-send: it the headings match it will pull the data.

  44. #44
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by Anuru View Post
    oK, wait pls..I will change and send it again...
    I have changed the heading to be similar in both the Daily summary and daily sheets. One more thing pls, I may have to insert new rows as per the requirement in the "daily sheets" (to increase the production lines), and the formula should not be affected by inserting new rows in to the daily sheet tabs..
    Attached Files Attached Files

  45. #45
    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
    30,925

    Re: Summary of daily data based on different criteria

    You will need to add something to the current line 24 which identifies it as the line of interest: BUT NOT in column A

    Think before you keep changing your mind.

    As for headings you need to do a lot of tiding up: e,g "CM / Dozen" vs "CM/ Dozen".

    "Present OP" / "Present HP" are not in "Daily" sheets !!!!!!!
    Last edited by JohnTopley; 05-18-2018 at 01:18 PM.

  46. #46
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    You will need to add something the current line 24 which identifies it as the line of interest: Think before you keep changing your mind.

    As for headings you need to do a lot of tiding up: e,g "CM / Dozen" vs "CM/ Dozen".

    "Present OP" / "Present HP" are not in "Daily" sheets !!!!!!!
    No problem I will do tidying up...

    Current line/row 24 will be changed when I add rows above to increase lines. That is why I mentioned that the formula should be locked in the position not the row number, then adding rows will not affect.

  47. #47
    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
    30,925

    Re: Summary of daily data based on different criteria

    be locked in the position
    all very well but we do not know the position (other than it is currently row 24).

    In this situation it is better to have the totals ABOVE the data e.g in Row 4.
    Last edited by JohnTopley; 05-18-2018 at 01:28 PM.

  48. #48
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    TRY

    in B2

    =IFERROR(INDEX(INDIRECT("'" & TEXT($A3,"D")&"-" & TEXT($A3,"mmm") &"'!$A$24:$Z$24"),,MATCH('Daily Summary'!B$2,INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$A$3:$Z$3"),0)),"")

    Copy across and down
    Hi john, everything works fine. Thanks a lot again for this great and brilliant work sheet.

  49. #49
    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
    30,925

    Re: Summary of daily data based on different criteria

    So are you leaving it "fixed" on line 24?

  50. #50
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    this message was removed.
    Last edited by Anuru; 05-19-2018 at 09:00 AM.

  51. #51
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    this message was removed.
    Last edited by Anuru; 05-19-2018 at 09:00 AM.

  52. #52
    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
    30,925

    Re: Summary of daily data based on different criteria

    I do understand the requirement: please give me some credit!

    Obviously they don't appear as the formula is currently "fixed" on row 24.

    I suggest you move those totals to row 4 and start the data in row 5. If not the formula is going to be somewhat more complex as we need to "match" the row starting from row 4 down.

  53. #53
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    I do understand the requirement: please give me some credit!

    Obviously they don't appear as the formula is currently "fixed" on row 24.

    I suggest you move those totals to row 4 and start the data in row 5. If not the formula is going to be somewhat more complex as we need to "match" the row starting from row 4 down.
    I understand John. But moving summary totals to the beginning of the table looks a bit odd.

  54. #54
    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
    30,925

    Re: Summary of daily data based on different criteria

    Put "Daily Summary" in column B i.e. currently row 24

    in B3

    =IFERROR(INDEX(INDIRECT("'" & TEXT($A3,"D")&"-" & TEXT($A3,"mmm") &"'!$A$4:$Z$100"),MATCH("Daily Summary",INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$B$4:$B$100"),0),MATCH('Daily Summary'!B$2,INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$A$3:$Z$3"),0)),"")

  55. #55
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    Put "Daily Summary" in column B i.e. currently row 24

    in B3

    =IFERROR(INDEX(INDIRECT("'" & TEXT($A3,"D")&"-" & TEXT($A3,"mmm") &"'!$A$4:$Z$100"),MATCH("Daily Summary",INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$B$4:$B$100"),0),MATCH('Daily Summary'!B$2,INDIRECT("'" & TEXT($A3,"D") & "-" & TEXT($A3,"mmm") &"'!$A$3:$Z$3"),0)),"")
    Thanks John. It worked and done.

  56. #56
    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
    30,925

    Re: Summary of daily data based on different criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  57. #57
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Hi john,
    I just had add one more piece of information("Garment Type)to the work book. It is highlighted in RED.
    The logic for this information is also similar to "Style".
    If you have time, pls do the necessary changes in the macro, and sorry for adding this again and disturbing you. I have attached the work book with
    the added information.

    Regards

  58. #58
    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
    30,925

    Re: Summary of daily data based on different criteria

    Please check attached,

  59. #59
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    From Column "K" of the Style Wise Summary, and Column "T" of the "Data" sheet, I can see the values have been shifted(probably by one column). Needs re arranging..

  60. #60
    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
    30,925

    Re: Summary of daily data based on different criteria

    See attached ....

  61. #61
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    The column shifting issue looks to be ok.

    I just found a little problem in the "Style wise summary". In line no H2, "Days Run" should be 3, but it is showing 1. I found this error when put 1,2,3 etc to "Days run" in all sheet tabs for checking purpose. Pls check..I have highlighted this in red. Pls see the attached work book.

    However, in the Data sheet, Days run for H2 line is showing correct...

  62. #62
    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
    30,925

    Re: Summary of daily data based on different criteria

    Again see attached ...

    I added sheet "Data Mapping" which shows correspondence between "Data" columns "Summary" columns

  63. #63
    Forum Contributor
    Join Date
    12-06-2013
    Location
    Sri Lanka
    MS-Off Ver
    Excel 2016
    Posts
    613

    Re: Summary of daily data based on different criteria

    Quote Originally Posted by JohnTopley View Post
    Again see attached ...

    I added sheet "Data Mapping" which shows correspondence between "Data" columns "Summary" columns
    It looks OK now.
    By the way, what does the "Data Mapping" do? Does it help macro to identify the columns that should not be counted?

  64. #64
    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
    30,925

    Re: Summary of daily data based on different criteria

    The "Data Mapping" is mainly for my benefit in case you have other amendments!

    There an array (IDX) in the VBA which is effectively the mapping and it would be possible to incorporate the Data Mapping into the VBA but I have no plans to do so!

+ 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] Look up and sum daily data to weekly summary
    By Spamanda in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-11-2016, 01:27 PM
  2. Transfer Daily Data from Daily Staffing Workbooks into a Running Annual Summary Workbook
    By nurseydiamond in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-07-2015, 07:05 PM
  3. [SOLVED] Summary of data based on multiple criteria
    By Reapz in forum Excel General
    Replies: 2
    Last Post: 09-16-2015, 06:46 PM
  4. Extracting data from a range that changes daily based on a cells criteria
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2014, 02:35 AM
  5. Generating a data summary sheet based on multiple criteria
    By Anuru in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 07-18-2014, 08:03 PM
  6. [SOLVED] Extracting data from summary tab to different tabs based on criteria
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-02-2013, 05:47 AM
  7. need help with data summary based on a daily basis
    By randypang in forum Excel General
    Replies: 1
    Last Post: 04-26-2013, 11:45 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