+ Reply to Thread
Results 1 to 3 of 3

Count Comma Separated Values in a Single Cell with a Less Than or Equal to Condition

  1. #1
    Registered User
    Join Date
    12-07-2015
    Location
    US
    MS-Off Ver
    10
    Posts
    1

    Count Comma Separated Values in a Single Cell with a Less Than or Equal to Condition

    This is my first post and it is for a question that has plagued me for quite a while.
    I'm not very tech savvy so I'm struggling a bit.

    I have a report where we put multiple number values in one cell, separated by commas (e.x., 32, 14, 3, 55, 107, 1, 0)
    If that example is in C4 then C5 will have the same format but with different numbers, (e.x., 5, 88, 4, 0)
    This continues for several rows worth of data.
    I am also working with two separate sheets, one that has all the general figures (the examples would be on this sheet) and the other is where I am compiling the information I need from the first sheet (where the function I need will be going).

    So, ultimately I need to go through these different rows and count how many times a number less than or equal to 14 appears.
    I would greatly appreciate any help there is to be had. Thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count Comma Separated Values in a Single Cell with a Less Than or Equal to Condition

    Hi,

    Have you considered using TextToColumns to put all the numbers in individual cells then using a COUNTIF() function?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count Comma Separated Values in a Single Cell with a Less Than or Equal to Condition

    I can get a count per cell...

    Data Range
    C
    D
    6
    32, 14, 3, 55, 107, 1, 0
    4
    7
    5, 88, 4, 0
    3
    8
    ------
    ------


    This formula entered in D4 and copied down:

    =SUMPRODUCT(--(--TRIM(MID(SUBSTITUTE(C6,",",REPT(" ",99)),
    (99*(ROW(INDIRECT("1:"&LEN(C6)-LEN(SUBSTITUTE(C6,",",""))+1))-1))+1,99))<=14))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Formula to count values in single cell separated by commas
    By aimeecrystalaid in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-25-2017, 01:01 AM
  2. [SOLVED] Using comma separated values in a single cell
    By joerobb in forum Excel General
    Replies: 7
    Last Post: 01-16-2015, 08:45 AM
  3. Count number appear in single column with comma separated
    By cheeyap91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-29-2014, 12:38 AM
  4. Replies: 3
    Last Post: 12-23-2013, 12:32 PM
  5. [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
  6. [SOLVED] Single cell Comma Separated Values to validation list [DIFFICULT QUESTION]
    By jgema in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-31-2013, 08:48 PM
  7. count of comma separated values
    By bujji1305 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-01-2012, 07:33 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