+ Reply to Thread
Results 1 to 4 of 4

Count instances of text in a comma-delimited column

  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Midland, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Count instances of text in a comma-delimited column

    Hello,

    I have a Google Form that has created a spreadsheet containing the form's collected data. One column contains individuals' responses to a "check-box" style question. Each cell in this column contains a comma-delimited list of all of the check-boxes that were selected on an individual's form. For instance:

    Cell C1: "first option, third option, fourth option, seventh option"
    Cell C2: "first option, second option, seventh option"
    ...and so on.

    How do I count the number of times "seventh option" appears in this column of responses? My first thought was to try =COUNTIF(FIND("seventh option",C:C),TRUE) ...but apparently FIND and COUNTIF don't play well together.

    (And yes, I'm aware that Google provides exactly this kind of summary for its forms. But I'd like to mine more data, cross-reference different combinations of responses, etc.)

    Thank you!
    --David

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Count instances of text in a comma-delimited column

    hi David, welcome to the forum. try:
    =SUMPRODUCT(--(LEN(C1:C10)-LEN(SUBSTITUTE(C1:C10,"seventh option",""))))/LEN("seventh option")

    use a bigger range if you need, but avoid using the whole column like C:C

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Count instances of text in a comma-delimited column

    See attached one possible way of doing this.

    This is basically what you've tried to do broken into stages so you can see visually what choices were made.

    Count.xlsx
    Say thanks, click *

  4. #4
    Registered User
    Join Date
    09-22-2009
    Location
    Midland, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Count instances of text in a comma-delimited column

    Quote Originally Posted by benishiryo View Post
    hi David, welcome to the forum. try:
    =SUMPRODUCT(--(LEN(C1:C10)-LEN(SUBSTITUTE(C1:C10,"seventh option",""))))/LEN("seventh option")

    use a bigger range if you need, but avoid using the whole column like C:C
    Hi benishiryo, that seems to work really well. Thanks! SUMPRODUCT strikes again...I've seen it before, and I should have guessed that it would be helpful here.

    Quote Originally Posted by Harribone View Post
    See attached one possible way of doing this.

    This is basically what you've tried to do broken into stages so you can see visually what choices were made.

    Attachment 217670
    Thanks Harribone...this works too, but I was hopeful to do it all in one step as given above. I appreciate your help!

    --David

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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