+ Reply to Thread
Results 1 to 12 of 12

formula for summary

  1. #1
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    formula for summary

    hi there, can anyone help me about the formula i would use in this summary.
    i attached the sample data and summary table. i need to count all the value for the specific variables.
    please note that may true data is 1000 lines or more.
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: formula for summary

    In the attached I use a helper column with this formula in E4 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Also note that the Category cells need to all be filled in ... ie no blanks in order for this to work.

    Then in I4 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Dave

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: formula for summary

    Not sure where you get 4 for Cat1/Sub1 from? There are only 3 for that combo, and that includes Sub1 and just 1

    1st, remove the "sub" part from C, then use this...
    I4=COUNTIFS($B$4:$B$25,G4,$C$4:$C$25,RIGHT(H4,1))
    copied down as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: formula for summary

    Ford if I understand correctly everything is Sub1 until it is Sub2 and therefore all Categories are Category1 Sub1 in that range and it would include dd in the Values column. I fear I've explained that very poorly.


    B
    C
    D
    3
    Value
    4
    Category1
    Sub1
    5
    Category1
    1
    aa
    6
    Category1
    2
    7
    Category1
    3
    bb
    8
    Category1
    4
    9
    Category1
    5
    cc
    10
    dd
    11
    Category1
    6
    12
    Category1
    7
    13
    Category1
    8
    14
    Category1
    Sub2
    15
    Category1
    1
    aa
    16
    Category1
    2
    bb
    17
    Category1
    3

  5. #5
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    Re: formula for summary

    Quote Originally Posted by FlameRetired View Post
    In the attached I use a helper column with this formula in E4 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Also note that the Category cells need to all be filled in ... ie no blanks in order for this to work.


    Then in I4 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    thanks for this, it helps a lot even though i need a helper column in my data. ill just need to adjust may data.

    quick question, what if my sub1 change to not consistent names? example name of place, how do i get the correct sub1??
    Last edited by angelosison00; 09-26-2019 at 10:27 PM.

  6. #6
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    Re: formula for summary

    Quote Originally Posted by FDibbins View Post
    Not sure where you get 4 for Cat1/Sub1 from? There are only 3 for that combo, and that includes Sub1 and just 1

    1st, remove the "sub" part from C, then use this...
    I4=COUNTIFS($B$4:$B$25,G4,$C$4:$C$25,RIGHT(H4,1))
    copied down as needed

    sorry but i need the sub part to complete the summary. it should be 4 for Cat1/Sub1 because row 10 also add up.
    thanks for the help.


    Quote Originally Posted by FlameRetired View Post
    Ford if I understand correctly everything is Sub1 until it is Sub2 and therefore all Categories are Category1 Sub1 in that range and it would include dd in the Values column. I fear I've explained that very poorly.


    B
    C
    D
    3
    Value
    4
    Category1
    Sub1
    5
    Category1
    1
    aa
    6
    Category1
    2
    7
    Category1
    3
    bb
    8
    Category1
    4
    9
    Category1
    5
    cc
    10
    dd
    11
    Category1
    6
    12
    Category1
    7
    13
    Category1
    8
    14
    Category1
    Sub2
    15
    Category1
    1
    aa
    16
    Category1
    2
    bb
    17
    Category1
    3

    this is correct. thanks for the help.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: formula for summary

    Quote Originally Posted by angelosison00 View Post
    sorry but i need the sub part to complete the summary. it should be 4 for Cat1/Sub1 because row 10 also add up.
    why? There is nothing in row 10 to indicate that it belongs to anything at all??

    If ANYTHING, because of how you have the subX positioned in that table, everything down to row 13 should be sub1 (or is it, anyway?)

  8. #8
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    Re: formula for summary

    Quote Originally Posted by FDibbins View Post
    Not sure where you get 4 for Cat1/Sub1 from? There are only 3 for that combo, and that includes Sub1 and just 1

    1st, remove the "sub" part from C, then use this...
    I4=COUNTIFS($B$4:$B$25,G4,$C$4:$C$25,RIGHT(H4,1))
    copied down as needed
    Quote Originally Posted by FDibbins View Post
    why? There is nothing in row 10 to indicate that it belongs to anything at all??

    If ANYTHING, because of how you have the subX positioned in that table, everything down to row 13 should be sub1 (or is it, anyway?)

    yes it is still sub1, even though is has no label in column B and C.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: formula for summary

    @ angelosison00

    I am not sure I understand this part:

    Quote Originally Posted by angelosison00 View Post
    thanks for this, it helps a lot even though i need a helper column in my data. ill just need to adjust may data.

    quick question, what if my sub1 change to not consistent names? example name of place, how do i get the correct sub1??
    Please upload an additional workbook that demonstrates that.

  10. #10
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    Re: formula for summary

    Quote Originally Posted by FDibbins View Post
    Not sure where you get 4 for Cat1/Sub1 from? There are only 3 for that combo, and that includes Sub1 and just 1

    1st, remove the "sub" part from C, then use this...
    I4=COUNTIFS($B$4:$B$25,G4,$C$4:$C$25,RIGHT(H4,1))
    copied down as needed
    Quote Originally Posted by FlameRetired View Post
    @ angelosison00

    I am not sure I understand this part:



    Please upload an additional workbook that demonstrates that.

    please see attached file. please take note that the shaded part of the summary should be the label that is not consistent in spelling.




    thanks
    Attached Files Attached Files

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: formula for summary

    This file ... still with helper columns.

    In column E to normalize the Category#
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In column F to set the limits of the names boundaries
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in Total Count
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    05-18-2017
    Location
    PHILIPPINES
    MS-Off Ver
    2010
    Posts
    26

    Re: formula for summary

    hi sorry for to much scenarios.

    what if i change the value to numbers instead of text. even though i still need the count not the sum.

    thanks

+ 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. Replies: 0
    Last Post: 09-15-2015, 03:08 PM
  2. [SOLVED] Need help in summary formula
    By vsravi.kmb in forum Excel General
    Replies: 13
    Last Post: 12-28-2014, 10:03 AM
  3. [SOLVED] Need help on summary formula
    By vsravi.kmb in forum Excel General
    Replies: 7
    Last Post: 10-19-2014, 09:59 AM
  4. Replies: 6
    Last Post: 06-05-2014, 04:40 AM
  5. Replies: 2
    Last Post: 06-21-2013, 07:23 AM
  6. Create a summary from multiple sheets on a master/summary sheet
    By detribus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2012, 08:04 PM
  7. Summary formula help
    By Kathryn J Bittman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2006, 09:30 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