+ Reply to Thread
Results 1 to 6 of 6

How to count data separated by commas

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    25

    Question How to count data separated by commas

    Hi guys,

    I would really appreciate it if anyone could help me with this task.

    I have one column of data:
    product1, product6, product85
    product8, product31, product1, product4, product23
    ....

    There’s about 1000 lines of this data with different product numbers separated by comma.

    Is there any easy way to count the quantity of each product and have the 2-column output like this:
    Product1|478
    Product2|39
    Product3|143

    Could please anyone help me with the best approach to accomplish this task?

    Thank you in advance!

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to count data separated by commas

    Hi
    to clarify, do you want to count:

    the number of product items in each row:
    product1, product6, product85 = 3

    the sum of the numbers attached to the word "product" in each row:
    product1, product6, product85 = 92

    the number of times a particular product, e.g. product6, occurs in any row in the column:
    product1, product6, product85
    product12, product6, product8

    => product6 = 2

  3. #3
    Registered User
    Join Date
    07-17-2014
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    25

    Re: How to count data separated by commas

    Hi NickyC,

    Thanks for your quick response.

    I want to count this:

    the number of times a particular product, e.g. product6, occurs in any row in the column:
    product1, product6, product85
    product12, product6, product8

    => product6 = 2

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to count data separated by commas

    By happy coincidence I had a similar query myself once

    try this macro. You must enter the input range as the range containing your list, and the output cell as the cell where you want to start the results table

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-17-2014
    Location
    Europe
    MS-Off Ver
    2010
    Posts
    25

    Re: How to count data separated by commas

    Thanks a lot NickyC!! Works great for me!!

    Wondering if Excel has any functions to accomplish the same?

  6. #6
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How to count data separated by commas

    Not that I'm aware of, but I'm more of a well-meaning amateur than a guru on these pages
    If you already have the list of products, then it should be possible using an array formula
    assuming your list of products in in range a1:a12, and your list of unique product names starts in cell D1, then enter this as an array formula and copy down to the cell adjacent to the other product names (for an array formula, copy the formula into the cell and press CONTROL+SHIFT+ENTER. a curly bracket should appear around your formula in the formula bar).

    Please Login or Register  to view this content.

+ 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] Formula or Function for count value separated by commas (,)
    By santosh226001 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-23-2014, 01:01 PM
  3. Replies: 5
    Last Post: 01-17-2014, 05:56 PM
  4. Counting with data separated by commas
    By tribulations in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2013, 10:06 AM
  5. Individualizing data separated by commas
    By Xmosis in forum Excel General
    Replies: 1
    Last Post: 02-14-2011, 02:14 AM
  6. Replies: 4
    Last Post: 01-16-2008, 12:43 AM
  7. Txt Data separated by commas import help
    By xburbx in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 09-05-2006, 07:10 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