+ Reply to Thread
Results 1 to 7 of 7

Count Comma Seperated Cell Value by Item Group

  1. #1
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Count Comma Seperated Cell Value by Item Group

    Hello,

    I want to count items which seperated by comma in a cell, by product group.
    How can I do that?

    Ex:
    Cell D6: Apple, Banana, Carrot

    Fruit List:
    Apple
    Banana
    Orange

    Vegetable List:
    Potato
    Tomato
    Carrot

    I want to see in E6 and F6 cells that D6 includes 2 fruit, 1 vegetable respectively.

    I also added sample workbook.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Count Comma Seperated Cell Value by Item Group

    In E6

    =SUMPRODUCT(--ISNUMBER(SEARCH(J$6:J$8,$D6)))

    copy across and down

    Counts TYPE not Occurrence so D7 which has Potato twice [Potato, Potato, Tomato, Orange] will count as 1
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Count Comma Seperated Cell Value by Item Group

    Thanks it is worked!

    But, I need to count recurrent values too. Maybe I can add a number near the value in a paranthesis like "Potato (2)". How can we achieve this?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Count Comma Seperated Cell Value by Item Group

    Excel 2017? is that a Mac or a PC version?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Count Comma Seperated Cell Value by Item Group

    This will work with a PC, but not a Mac...

    =SUMPRODUCT(--ISNUMBER(SEARCH(FILTERXML("<A><B>"&SUBSTITUTE($D6,", ","</B><B>")&"</B></A>","//B"),TRANSPOSE(J$6:J$8))))

  6. #6
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Count Comma Seperated Cell Value by Item Group

    I use PC and it worked fine.

    You are a Genious!

    I am so grateful!!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Count Comma Seperated Cell Value by Item Group

    Nahh. i've just done it before!

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] Seperation of strings that are seperated by comma within a cell
    By k1282 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 9
    Last Post: 12-19-2019, 06:25 AM
  2. [SOLVED] Group & concatenate data in comma seperated format
    By aashishni in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-19-2018, 08:29 AM
  3. VBA/Forumula for count nos for seperated by comma(,)
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-06-2016, 09:21 AM
  4. [SOLVED] Macro to SUM and COUNT rows that have been seperated by an Item.
    By bkanealy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-23-2014, 01:59 PM
  5. [SOLVED] Formula to count the occurance of values seperated by a comma
    By bouncingbudha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 10:23 PM
  6. Put all cells in one cell seperated by comma
    By kokopoko in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 08-05-2005, 10:03 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