+ Reply to Thread
Results 1 to 7 of 7

Collating data in a table into smaller groups

  1. #1
    Registered User
    Join Date
    09-30-2020
    Location
    England
    MS-Off Ver
    2008
    Posts
    3

    Exclamation Collating data in a table into smaller groups

    I need to collate data into groups so that I can produce a pie chart with less information.

    I need to make a formula that can group based on a word.

    (The number data after the second colon (mostly) would be the adjacent column but it's easier to represent like this)
    "
    Daily: once per day : 4
    Daily: twice per day : 5
    Less than monthly : 1
    Monthly: four times a month or more often : 2
    Monthly: once a month : 4
    Monthly: three times a month : 2
    Monthly: twice a month : 4
    Seldom or not at all : 2
    Weekly: once per week : 1
    Weekly: three times per week : 3
    Weekly: twice per week : 1
    "

    The end result would look like this:

    Daily: 9

    Monthly: 12

    Weekly: 5

    Seldom: 3

    I have several different tables that have been extracted from our sources but it doesn't include where information is missing such as: Daily: three times per day, Daily: four times per day, Weekly: four times per week, but other tables might include this.

    For this reason is there a formula such as:


    If(B2:B11, "Daily", Include corresponding data, I.E C2:C5)

    The reason I can't do this manually is the reason above, sometimes there are different responses for daily etc.

    Please does anyone have advice for this.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2306
    Posts
    40,644

    Re: Collating data in a table into smaller groups

    In i4, coped down:

    =SUMIF(B:B,"*"&H4&"*",C:C)

    also correct the spelling of monthly in H5
    Glenn



  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    23,775

    Re: Collating data in a table into smaller groups

    You could use a formula like this in I4:

    =SUMIFS(C$4:C$15,$B$4:$B$15,$H4&"*")

    then copy it down.
    This does not pick up the category "Less than monthly" within the "Seldom" group, so the results are slightly different than yours - perhaps you could also have a category for "Less than monthly".

    Hope this helps.

    Pete

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    23,775

    Re: Collating data in a table into smaller groups

    An alternative to having another group would be to change the formula in I7 to this:

    =SUMIFS(C$4:C$15,$B$4:$B$15,$H7&"*")+SUMIFS(C$4:C$15,$B$4:$B$15,"Less than monthly")

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-30-2020
    Location
    England
    MS-Off Ver
    2008
    Posts
    3

    Re: Collating data in a table into smaller groups

    Wow thank you so much.

    I wasn't aware it could be solved like this.

    Thanks.

    Tom

  6. #6
    Registered User
    Join Date
    09-30-2020
    Location
    England
    MS-Off Ver
    2008
    Posts
    3

    Re: Collating data in a table into smaller groups

    Quote Originally Posted by Pete_UK View Post
    An alternative to having another group would be to change the formula in I7 to this:

    =SUMIFS(C$4:C$15,$B$4:$B$15,$H7&"*")+SUMIFS(C$4:C$15,$B$4:$B$15,"Less than monthly")

    Hope this helps.

    Pete
    This confuses me quite a lot as I don't know what $, & and * represents properly so I'm worried I'll make mistakes. I agree with the error and having more than 4 data points in a pie chart makes it "unnecessary complicated" although I think if I were to use that I would make a lot of mistakes if that makes sense.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    23,775

    Re: Collating data in a table into smaller groups

    The $ symbols anchor the row/column references, so they do not change when the formula is copied down or across, as appropriate. I thought you might like to summarise the columns D and E in your table, so you can just copy the formula across if you do.

    The & symbol is used to join two text values together (also known as concatenation).

    The * symbol is a wildcard meaning "any characters" (or none). Glenn's solution also includes these.

    To avoid having to type the formula yourself, you can highlight the formula on this board, then CTRL-C to copy it, then select the appropriate cell in your Excel file and click in the formula bar as if to edit it (or press the F2 key), and then CTRL-V to paste the formula into the cell, followed by the Enter key.

    Hope this helps.

    Pete

+ 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. Data extraction table into smaller list
    By Kedamono in forum Excel General
    Replies: 2
    Last Post: 03-12-2020, 05:41 PM
  2. [SOLVED] Formula for collating Data into a table
    By RachA12 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-14-2018, 05:35 AM
  3. Replies: 2
    Last Post: 09-15-2016, 01:10 AM
  4. [SOLVED] Grouping table data into smaller table
    By kenny_kk in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-07-2015, 01:59 PM
  5. [SOLVED] Getting data from a huge table to a smaller and organized one.
    By Eldernurf in forum Excel General
    Replies: 4
    Last Post: 10-24-2013, 02:55 PM
  6. [SOLVED] Getting data from table into smaller tables on a seperate sheet
    By FootyMan in forum Excel General
    Replies: 5
    Last Post: 08-27-2013, 10:25 AM
  7. Filtering data from one large table into many smaller ones based on certain criteria.
    By hugedomer11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-11-2010, 12:57 AM

Tags for this Thread

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