+ Reply to Thread
Results 1 to 8 of 8

Google Sheets - QUERY to give a total number of times a class is listed

  1. #1
    Registered User
    Join Date
    04-02-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Google Sheets - QUERY to give a total number of times a class is listed

    I am looking for help with creating a QUERY to give a total number of times a class is listed. Thank you so much for any help. My head hurts from banging it against a wall trying to solve this.

    Spreadsheet has a column for:

    - Clan Name ( 1 of the 3 clan names are in the column cell per row. clanA, clanB, clanC)
    - Class (1 class per cell per row. choice of classA, classB, classC, classD, classE, classF)

    Example Workbook:

    docs.google.com/spreadsheets/d/10aJdqZx6q99QahM1O2XbZhZFNcbkGEE0tIifrMIDGjs/edit?usp=sharing"

    Trying to craft a query that will give a result like this:

    | Clan Name | Class | Total per Class |
    | --------- | ----- | --------------- |
    | clanA |classA | # |
    | |classB | # |
    | clanB |classA | # |

    Example Data Set:
    example1.jpg

    Example of outcome:

    example2.jpg
    Last edited by 404'ed; 07-23-2022 at 12:54 PM. Reason: Creating a better quality post

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,820

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    Administrative Note:

    Please attach a sample workbook. We cannot work with a picture.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are inexperienced here, I have done it for you this time.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-02-2019
    Location
    USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    Thank you so much! Edited and added a workbook link.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    HOW TO ATTACH YOUR SAMPLE WORKBOOK:


    Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

    Maybe I can't help you with the problem since it is Google.sheets.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    Try something like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    @ oeldere,

    Google sheets QUERY () requires a google sheets file. isnt a Google Sheets file suitable for that? or do you expect everyone helping to download an excel file, then upload and convert it to a Google Sheets file just so you have the pleasure of having an excel file which can not itself work with QUERY() function?
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    @janmorris

    Google sheets QUERY () requires a google sheets file.

    OP can attache a google sheet file.

  8. #8
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Google Sheets - QUERY to give a total number of times a class is listed

    Maybe I can't help you with the problem since it is Google.sheets.
    Maybe right

    a google sheets link works fine for those who can.

    to get you up to speed, .gsheet files are simply links to the actual online file, so downloading a file is as useful as udders on a bull.

    https://support.google.com/a/answer/...on-my-computer
    Last edited by janmorris; 07-28-2022 at 06:58 AM.

+ 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. Query Formula To Find Oldest Duplicates That Contain Certain Keywords - Google Sheets
    By Dave Shopping in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 07-07-2022, 02:06 AM
  2. Query(Importrange) in Google Sheets
    By PGLeeM in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 12-10-2021, 05:22 PM
  3. Google Sheets: <=0 vs < =' ' in a query
    By BJANeeeco in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 07-28-2021, 08:44 AM
  4. Query in Google Sheets
    By PhilippBonnie in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 03-26-2021, 10:18 PM
  5. Google Sheets Array Query
    By AncestryGuy in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 03-26-2021, 06:24 AM
  6. [SOLVED] Converting Google Sheets QUERY to Correct Excel Formula
    By davis909 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2017, 09:14 AM
  7. Google Sheets QUERY How can I do the same in Excel?
    By Ziggy21 in forum Excel General
    Replies: 12
    Last Post: 10-04-2015, 07:54 PM

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