+ Reply to Thread
Results 1 to 17 of 17

Summarizing data with reference to different criteria

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

    Thumbs up Summarizing data with reference to different criteria

    Dear Experts,

    I have attached here work sheet for your reference. In this work sheet I need the following;

    01). "Monthly and Factory Wise Summary"

    In this sheet, I need to calculate the total values with reference to "Month" and "Factory". For example for the month of "March", the total value for " ACCL" is 266212(cell D10). The same way for the E10,F10, G10 and I10 and across down.
    Month is calculated taking "Monday to the Sunday".

    02). "Weekly and Factory Wise Summary"

    In this sheet, I need to calculate the total values with reference to "Month", "Week" and "Factory". For example for the first week of the month of "April", the total value for " ACCL" is 88842(cell G8). The same way it should work for the H8,I8,J8 and K8 and across down
    Week is calculated taking "Monday to next Sunday".

    03) "Week and Department Wise Summary"
    In this sheet, I need to calculate the total values with reference to "Month", "Week" and "Department". For example for the first week of the month of "April", the total value for " BT Boys is 156026 (cell G8). The same way it should work for the other cells(departments)
    Week is calculated taking "Monday to next Sunday".


    The raw data is available in the sheet " Master Sheet"


    Please consider that the data in this attachment have been entered manually with support of filtering. Therefore, there can be errors in case you want to verify.

    Thanks in advance.
    Anuruddha

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Summarizing data with reference to different criteria

    Taking this one question at a time, the proposed solution to the "Monthly and Factory Wise Summary" is as follows:
    1) Take advantage of the layout of the 'Master Sheet' by adding a helper column with the month number. The first cell is manually filled in and the rest of the column is populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2) A second helper column coverts the month numbers to dates (formatted mmmm'yy) using the DATE function as follows: =DATE(2017,Y8,1)
    3) The formula that populates the 'Month and Factory Wise Summary' sheet in the range D10:H28 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note: Column B is now populated with dates formatted mmmm'yy
    Note: This is being returned as an .xlsx file as your profile shows you have the 2016 version.
    I'll work on portions 2 and 3 later unless another contributor has solved those beforehand.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JeteMc View Post
    Taking this one question at a time, the proposed solution to the "Monthly and Factory Wise Summary" is as follows:
    1) Take advantage of the layout of the 'Master Sheet' by adding a helper column with the month number. The first cell is manually filled in and the rest of the column is populated by the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2) A second helper column coverts the month numbers to dates (formatted mmmm'yy) using the DATE function as follows: =DATE(2017,Y8,1)
    3) The formula that populates the 'Month and Factory Wise Summary' sheet in the range D10:H28 is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note: Column B is now populated with dates formatted mmmm'yy
    Note: This is being returned as an .xlsx file as your profile shows you have the 2016 version.
    I'll work on portions 2 and 3 later unless another contributor has solved those beforehand.
    Let us know if you have any questions.
    Hi Jete,
    Thanks a lot for your brilliant solution.
    Kindly let me know which column have you target for date. I mean, is it column "O"(Cut off date) or "P"(Delivery Date).
    It is my mistake not mentioning which column to be considered as the "target date" calculations.
    However, if you have already considered col "O", it is right.
    Pls advise.

    Further, I have both excel 2016 and 2013 in my two computers. Kindly advise which version of excel is faster and error free. Also, will this solution work in both the versions without any issue?

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

    Re: Summarizing data with reference to different criteria

    Also let me know whether month quantity is calculated taking "first Monday to Sunday"?

  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
    28,199

    Re: Summarizing data with reference to different criteria

    Helper in "Master Data" column AB

    =WEEKNUM(O8)&YEAR(O8)


    helper in "Week and Factory Wise Summary" column O

    =IF(D8<>"",WEEKNUM(D8)&YEAR(D8),"")


    helper in "Week and Departmenty Wise Summary" column Q

    =IF(D8<>"",WEEKNUM(D8)&YEAR(D8),"")

    in "Week and Factory Wise Summary"

    in G8

    =SUMIFS('Master Sheet'!$N$8:$N$2000,'Master Sheet'!$Q$8:$Q$2000,G$6,'Master Sheet'!$AB$8:$AB$2000,$O8)

    Copy across and down for April

    Copy/paste for other months


    in "Week and Department Wise Summary"

    in F8

    =SUMIFS('Master Sheet'!$N$8:$N$2000,'Master Sheet'!$B$8:$B$2000,F$6,'Master Sheet'!$AB$8:$AB$2000,$Q8)

    Copy across and down for April

    Copy/paste for other months
    Attached Files Attached Files

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

    Re: Summarizing data with reference to different criteria

    Hiiii John,
    Nice to see you again. Thanks for your brilliant solution as always.
    I will check this and come back to you if I find anything to be explained.

    Thanks again.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Summarizing data with reference to different criteria

    Regarding the questions in post #3:
    I bypassed both columns O and P and used column H. Whomever is entering information in the 'Master Sheet' is already deciding where the month starts and ends and putting the term 'Total quantity' in column H at that point.
    I don't have either the 2013 or 2016 versions, so I don't know which is better. The solution should work with either version as it was produced using the 2010 version.
    Let us know if you have any questions.

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JohnTopley View Post
    Helper in "Master Data" column AB

    =WEEKNUM(O8)&YEAR(O8)


    helper in "Week and Factory Wise Summary" column O

    =IF(D8<>"",WEEKNUM(D8)&YEAR(D8),"")


    helper in "Week and Departmenty Wise Summary" column Q

    =IF(D8<>"",WEEKNUM(D8)&YEAR(D8),"")

    in "Week and Factory Wise Summary"

    in G8

    =SUMIFS('Master Sheet'!$N$8:$N$2000,'Master Sheet'!$Q$8:$Q$2000,G$6,'Master Sheet'!$AB$8:$AB$2000,$O8)

    Copy across and down for April

    Copy/paste for other months


    in "Week and Department Wise Summary"

    in F8

    =SUMIFS('Master Sheet'!$N$8:$N$2000,'Master Sheet'!$B$8:$B$2000,F$6,'Master Sheet'!$AB$8:$AB$2000,$Q8)

    Copy across and down for April

    Copy/paste for other months
    Hi John,
    I am not understanding how the the following formula works.

    =WEEKDAY(O19,1)

    Because, I have attached in the forum half of the "master sheet"(because, the full sheet is around 1.3MB, which I cannot post on the forum), and now I started copying all the formulas in to my "original sheet". However, now I am getting different figures, and not matching with your work out.

    Any advice pls..?

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JeteMc View Post
    Regarding the questions in post #3:
    I bypassed both columns O and P and used column H. Whomever is entering information in the 'Master Sheet' is already deciding where the month starts and ends and putting the term 'Total quantity' in column H at that point.
    I don't have either the 2013 or 2016 versions, so I don't know which is better. The solution should work with either version as it was produced using the 2010 version.
    Let us know if you have any questions.
    Column "H" has "name(style name)..?? What is the relation with that?

  10. #10
    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,199

    Re: Summarizing data with reference to different criteria

    the WEEKDAY column is redundant.

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

    Question Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JohnTopley View Post
    the WEEKDAY column is redundant.
    Hi John,
    I have re worked the original sheet using your solutions (for now monthly and factory wise summary only). I copied the formulas you have provided, but my totals are not matching with your totals. I don't see anything wrong with the formulas. I checked many times.

    I have again attached the original work sheet (master sheet contains data only up to July as the I cannot post more than 1000kb on the forum). If you can provide me an e mail ID, I can send you the whole work sheet(original).

    Pls check and advise me about my mistakes.

    Note: I have added some extra information on this work sheet for the "Monthly and factory wise summary". However, I have used the same formulas you have provided.

    Regards
    Anuruddha

  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
    28,199

    Re: Summarizing data with reference to different criteria

    The formula is not mine (it's JeteMc's) BUT you do not check the formulae very well .....

    =SUMIFS('Master Sheet'!$N$7:$N$1090,'Master Sheet'!$AB$7:$AB$1090,$B16,'Master Sheet'!$R$7:$R$1090,E$5)

    perhaps should be .....


    =SUMIFS('Master Sheet'!$O$7:$O$1090,'Master Sheet'!$AB$7:$AB$1090,$B16,'Master Sheet'!$R$7:$R$1090,E$5)


    If it should be O not N then the formulae I gave need adjusting also as I summed column N

    You did not specify which column(s) to use so an assumption was made that it was N and at no time did you correct this.
    Last edited by JohnTopley; 09-22-2017 at 02:55 PM.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Summarizing data with reference to different criteria

    Regarding the question; Column "H" has "name(style name)..?? What is the relation with that?: The relation is that on the Master Sheet in H95 is the text "March'17 Total quantity" and in H354 is the text "April'17 Total quantity" and so on. So whoever is putting together the master sheet is already determining where one month ends and another begins.
    Let us know if you have any questions.

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JohnTopley View Post
    The formula is not mine (it's JeteMc's) BUT you do not check the formulae very well .....

    =SUMIFS('Master Sheet'!$N$7:$N$1090,'Master Sheet'!$AB$7:$AB$1090,$B16,'Master Sheet'!$R$7:$R$1090,E$5)

    perhaps should be .....


    =SUMIFS('Master Sheet'!$O$7:$O$1090,'Master Sheet'!$AB$7:$AB$1090,$B16,'Master Sheet'!$R$7:$R$1090,E$5)


    If it should be O not N then the formulae I gave need adjusting also as I summed column N

    You did not specify which column(s) to use so an assumption was made that it was N and at no time did you correct this.
    Yes. I got it. I have missed the main part of the formula to check. Stupid me...

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JeteMc View Post
    Regarding the question; Column "H" has "name(style name)..?? What is the relation with that?: The relation is that on the Master Sheet in H95 is the text "March'17 Total quantity" and in H354 is the text "April'17 Total quantity" and so on. So whoever is putting together the master sheet is already determining where one month ends and another begins.
    Let us know if you have any questions.
    Okay. Thanks for taking time to explain, JeteMc.

  16. #16
    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,199

    Re: Summarizing data with reference to different criteria

    The attached has updated formulae to reflect the additional columns.

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

    Re: Summarizing data with reference to different criteria

    Quote Originally Posted by JohnTopley View Post
    The attached has updated formulae to reflect the additional columns.
    Thanks a lot John. Feel so confident when you are on the forum. Thanks for your support as always.

+ 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] Summarizing an attendance tracker for quick reference
    By taylorsm in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-01-2016, 05:06 PM
  2. Replies: 3
    Last Post: 08-25-2016, 08:18 PM
  3. Replies: 4
    Last Post: 11-19-2013, 10:32 AM
  4. Need some help with summarizing data...
    By vkeller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2012, 11:56 AM
  5. How to find where summarizing met certain criteria ??
    By lazarfcrs in forum Excel General
    Replies: 0
    Last Post: 04-20-2011, 06:19 AM
  6. Summarizing Data across Worksheets using a single reference
    By Mugen123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2010, 11:19 AM
  7. Summarizing data
    By dallymo in forum Excel General
    Replies: 7
    Last Post: 01-22-2010, 11:38 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