+ Reply to Thread
Results 1 to 5 of 5

Search for a string in cells in a column and diplaying a count...

  1. #1
    Registered User
    Join Date
    01-03-2014
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Search for a string in cells in a column and diplaying a count...

    Here's what I have:
    cell1 - red, blue, yellow
    cell2 - green, purple, yellow
    cell3 - cyan, black
    cell4 - red, black
    cell5 - magenta, purple, teal
    cell6 - brown, pink, teal

    What I need:
    red - 2
    blue - 1
    yellow - 2
    green - 1
    ... and so on for each colour

    How do I get the above results in google sheets???

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

    Re: Search for a string in cells in a column and diplaying a count...

    This is an Excel forum - how are we to know if Google sheets is compatible?

    In Excel you could do this in D1:

    =COUNTIF(A:A,"*"&C1&"*")

    assuming your mixes of colours are in column A, and that your first colour (red) is in C1, with the other colours below it. Copy the formula down as required.

    Hope this helps.

    Pete

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Search for a string in cells in a column and diplaying a count...

    Try this

    in B1

    =COUNTIF($A$1:$A$6,"*"&C1&"*")
    and drag formula down

    A
    B
    C
    1
    red,blue,yellow
    2
    red
    2
    green,purple,yellow
    1
    blue
    3
    cyan,black
    1
    green
    4
    red,black
    2
    black
    5
    magenta,purple,teal
    1
    magenta
    6
    brown,pink,teal
    2
    purple
    7
    2
    teal
    8
    1
    brown
    9
    1
    pink
    10
    2
    yellow
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    01-03-2014
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Search for a string in cells in a column and diplaying a count...

    Thanks Pete and Alkey, your solutions worked.
    First post here and love the quick response.

    Thanks again.

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

    Re: Search for a string in cells in a column and diplaying a count...

    Well, thanks for feeding back, and thanks for the rep.

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

    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. Replies: 7
    Last Post: 01-09-2013, 02:28 PM
  2. Search column for string and return every row with that string in new sheet
    By myers601 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2012, 06:02 PM
  3. [SOLVED] Search for string across header row, then search for another string down found column
    By TucsonJack in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2012, 02:09 PM
  4. Replies: 1
    Last Post: 07-26-2011, 06:48 AM
  5. Replies: 3
    Last Post: 07-16-2010, 09:45 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