+ Reply to Thread
Results 1 to 5 of 5

Counting Letters in a Column

Hybrid View

  1. #1
    Registered User
    Join Date
    05-18-2005
    Posts
    60

    Counting Letters in a Column

    Hi folks,

    I have a spreadsheet where there is survey data that I need to begin analyzing. In several of the questions there were multiple choice answers that could be answered by any combination or just one letter.

    For example, answer 3 has many that have ABD, ABC, BCD, etc.. For analysis purposes I want to start first with the number of A's, B's, C's etc, then look at the unique combinations. Can "countif" count text entries, if so what would the formula look like?

    Thanks,

    PZan

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Here are 2 ways, using cells A1:A14

    Choices
    A
    B
    C
    AB
    BC
    AC
    A
    B
    C
    AB
    BC
    ABC
    AC


    =COUNTIF($J$1:$J$14,"A")
    Returns the count of just A's(2)

    =COUNTIF($J$1:$J$14,"ABC")
    Returns the count of ABC's (1)

    OR

    If you use a Pivot Table, it will return a list of all unique combinations in the list with their count:

    Data>Pivot Table>Excel List...[Next]
    Select the range A1:A13...[Next]
    Click [Layout]
    --->ROW: Drag "Choices"
    --->DATA: Drag "Choices" (it will change to "Count of Choices")
    Click [OK]
    Check "Existing Worksheet" and select a cell to place the table in
    Click [Finish]

    It will return something like this:
    Count of Choices
    ----------------------
    Choices___Total
    A_________2
    AB________2
    ABC_______1
    AC________2
    B_________2
    BC________2
    C_________2



    Will either of those help?

    Ron

  3. #3
    Registered User
    Join Date
    05-18-2005
    Posts
    60
    Not really, what I am looking for is a count of just A's that would include ABC, so in your example I would like a formula that would return "7" as the cells that contain any "A".

    I know about the pivot table option and that is my "plan B" if I need to use it but I would prefer a formula driven approach.

    Thanks,

    PZan

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Ok...Try this:


    For the list in A1:A14 . . .

    Choices
    A
    B
    C
    AB
    BC
    AC
    A
    B
    C
    AB
    BC
    ABC
    AC


    =COUNTIF($A$2:$A$14,"*A*")

    That will return the number of cells that contain A.

    Does that help?

    Ron

  5. #5
    Registered User
    Join Date
    05-18-2005
    Posts
    60
    BINGO!

    Thanks for the help!

    PZan

+ 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