+ Reply to Thread
Results 1 to 5 of 5

Count number appear in single column with comma separated

  1. #1
    Registered User
    Join Date
    10-28-2014
    Location
    malaysia
    MS-Off Ver
    2007
    Posts
    2

    Count number appear in single column with comma separated

    Hi all,


    11.PNG



    Have problem using countif.

    For example to get NUMBER 11, answer is incorrect when there's a comma

  2. #2
    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: Count number appear in single column with comma separated

    And what number do expect as a result and how did you arrived at it?

    By my calculations the answer is 15

    =SUM(IF(LEN(A1:A24)-LEN(SUBSTITUTE(A1:A24,",",""))>0,LEN(A1:A24)-LEN(SUBSTITUTE(A1:A24,",",""))+1,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Row\Col
    A
    B
    C
    1
    12
    2
    11
    15
    3
    12
    4
    7,22
    5
    16
    6
    11
    7
    8
    11
    9
    10
    11
    11
    6
    12
    10
    13
    14
    26
    15
    1
    16
    25
    17
    18
    10,11
    19
    1,11
    20
    10
    21
    4
    22
    22,23,25
    23
    21
    24
    9,10,11,12,13,14
    Last edited by AlKey; 10-28-2014 at 11:56 PM.
    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

  3. #3
    Registered User
    Join Date
    10-28-2014
    Location
    malaysia
    MS-Off Ver
    2007
    Posts
    2

    Re: Count number appear in single column with comma separated

    This is actually answer that answered by the client.

    My objective is to get ( total of how many people selected answer for example number "11" )

    in this case 11 = 7

    =countif[range][criteria] couldnt give me the correct answer

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Count number appear in single column with comma separated

    Perhaps:

    Put criteria in C1 (ie.11) and put this ind D1 :

    =COUNT(SEARCH(C1,SUBSTITUTE(A1:A24,","," ")))

    Using array formulas.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Count number appear in single column with comma separated

    Countif will do it


    =SUM(COUNTIF(A1:A24,{11,"*,11","*11,*"}))
    Last edited by :) Sixthsense :); 10-29-2014 at 12:45 AM.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. Macro to create a list of sheets, separated with comma in a single cell
    By manolomana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2014, 11:00 AM
  2. [SOLVED] How to count values separated by a comma
    By PlamSa in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-19-2013, 09:10 AM
  3. Count number of occurrences separated by comma
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2013, 03:39 AM
  4. count comma separated information
    By fjosef87 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 04-04-2010, 10:47 AM
  5. Column/cells to single cell comma separated data?
    By egeorge4 in forum Excel General
    Replies: 1
    Last Post: 04-27-2007, 03:53 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