+ Reply to Thread
Results 1 to 13 of 13

analyzing comma separated data

  1. #1
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    analyzing comma separated data

    I'm analyzing a survey. A column (which equals a question) offers multiple choice answers: A-F. The answers look like this:
    A
    A
    A, F
    B
    B, C, D
    A, C
    A, C, D, F

    So row "A, C, D, F" contains four answers in a single cell. How can I analyze how many answers of each type (A, B, C, D, E, F) are there in the entire column? I can make a column for each type of answer and then divide cells so that each answer gets a separate cell but I only know how to do that manually and it's lot of work.

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: analyzing comma separated data

    First highlight the entire column then on the Data menu, use "text-to-columns". This will put the data in separate columns. You can then create a formula "=count" to count how many answers per row.

  3. #3
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    Hmmm you mean how many answers per column? When I do what you described, I get the same structure but divided into separate columns:
    A
    A
    A F
    B
    B C D
    A C
    A C D F

    If I count answers in the first column, I will get A and B answers mixed up. And besides it says in Help that =count can only be used to count numbers and these are letters...

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: analyzing comma separated data

    Try this with your original data.

    Assume data is in A1:A10,

    Please Login or Register  to view this content.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    Thanks but I'm getting 'The formula you typed contains an error'. I tried several different cell ranges so it's not that.

  6. #6
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: analyzing comma separated data

    Try replacing "," with ";".
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  7. #7
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    This time I got #N/A and under the exclamation mark it says Value Not Available Error.

  8. #8
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: analyzing comma separated data

    It's probably because of your region excel version. I don't know much about these versions variations. try any of these.

    Please Login or Register  to view this content.
    Or,

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    Both formulas give 'The formula you typed contains an error' so I replaced commas with ;
    After that, first formula gives #N/A and the second produces this mysterious result: 2 (just number two)
    That's for this actual data:
    A, B
    B
    D
    A
    A
    G
    A, B
    A, F
    A
    and this formula:
    =SUMPRODUCT(ISNUMBER(FIND({"A";"B";"C";"D";"E";"F";"G"};I3:I11))+0)

  10. #10
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: analyzing comma separated data

    How about this?

    =SUM(COUNTIF(I3:I11;"*"&{"A";"B";"C";"D";"E";"F";"G"}&"*"))

  11. #11
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    This returns '12' which is the number of all answers combined. I hope I made it clear that I'm looking for number of times each answer appeared. Like
    A - 6
    B - 3
    C - 0
    D - 1
    ...
    If that wasn't clear, I apologize.

  12. #12
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: analyzing comma separated data

    If you want to count each answer,

    =COUNTIF(I3:I11,"*A*")

    change A to 2nd answer to count another answer

    You can also enter the answers in a cell & link in the formula.

    eg: enter all the answers like A, B, C, D etc.. in J3:J9. then use in K3,

    =COUNTIF($I$3:$I$11,"*"&J3&"*")

    then copy down to K9

  13. #13
    Registered User
    Join Date
    04-02-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: analyzing comma separated data

    Thanks, this works!

+ 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