+ Reply to Thread
Results 1 to 8 of 8

How to count and sum of numbers separated by comma in multiple cells of a row in excel?

  1. #1
    Registered User
    Join Date
    06-14-2020
    Location
    India
    MS-Off Ver
    2010
    Posts
    7

    How to count and sum of numbers separated by comma in multiple cells of a row in excel?

    I am attaching here one excel file in which I want to count and sum of numbers seperated by comma in multiple cells of one row.

    In Z9 cell I want to count all values seprated by comma in Row 9 but given in "Visit" columns.

    In AA9 cell I want to count all values seprated by comma in Row 9 but given in "Tel" columns.

    In Z10 cell I want to sum all values seprated by comma in Row 10 but given in "Visit" columns

    In AA10 cell I want to sum all values seprated by comma in Row 10 but given in "Tel" columns.

    Thanks and Regards,

    Pareshkumarparekh
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,652

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    I got 11 & 10 for 1st row (instead of 10 & 9) and 7 & 6 for 2nd row (instead of 13 & 11)
    In Z9:
    Please Login or Register  to view this content.
    Drag down and accross.

    In which (for instant row 9, case: Visit):
    Sumproduct: count cells visit those are ocupied = 6 (month 1, 2, 4, 5, 9, 12)
    Countifs: count number of "," in cells visit. = 5 (1,2,5,9,12)
    Total: 11
    Quang PT

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    Hi,

    Assuming all values are only ever single-digit:

    In Z9, count for row 9:

    =SUMPRODUCT(N((B$8:Y$8=Z$8)*MID(B9:Y9&"000",{1;3},1)>0))

    and copied across.

    In Z10, sum for row 10:

    =SUMPRODUCT((B$8:Y$8=Z$8)*MID(B10:Y10&"000",{1;3},1))


    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,652

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    Quote Originally Posted by XOR LX View Post
    In Z9, count for row 9:
    and copied across.
    In Z10, sum for row 10:
    Regards
    Is it a single formula in Z9 then copy down and accross?

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    Quote Originally Posted by bebo021999 View Post
    Is it a single formula in Z9 then copy down and accross?
    No, as I said it's two separate formulas. That's what the OP asked for if you look at his workbook. Not sure why he wants it that way!

    Regards

  6. #6
    Registered User
    Join Date
    06-14-2020
    Location
    India
    MS-Off Ver
    2010
    Posts
    7

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    Dear Friend,

    It is working fine for single digit, but thre may be two digit, so for two digit it is not working,

    Thanks and Regards

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,652

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    My formula in #4 works for data like this:
    1,2
    3,4
    10,5
    12,10
    it is counting cell with data and each comma "," add 1

  8. #8
    Registered User
    Join Date
    06-14-2020
    Location
    India
    MS-Off Ver
    2010
    Posts
    7

    Re: How to count and sum of numbers separated by comma in multiple cells of a row in excel

    Thank You friend,

    Kindly also provide solution for "Sum" in Z10 and AA 10 as given below ( Kindly note - in any cell there may have One, two, three or four numaric values with seperated by comma and any number may have one or two digit , For example - 2,10,3 or 1,2,3 or 9,11,8 or 11,8,10 or 10,6,5 or 1,2,3,4 -------- and like way)

    In Z10 cell I want to sum all values seprated by comma in Row 10 but given in "Visit" columns

    In AA10 cell I want to sum all values seprated by comma in Row 10 but given in "Tel" columns.

+ 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. Replies: 11
    Last Post: 09-16-2020, 09:38 PM
  2. Average of comma separated numbers from multiple cells
    By engineer_infinity in forum Excel General
    Replies: 7
    Last Post: 04-03-2020, 04:48 PM
  3. [SOLVED] count and category comma separated numbers.
    By sathi87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2018, 07:04 AM
  4. count unique comma separated names in range of cells
    By raogm2001 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-07-2017, 09:50 AM
  5. Separating multiple data separated by a comma into single cells.
    By sgmgrider in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2015, 05:58 PM
  6. [SOLVED] Counting number of occurrences in cells with numbers separated by a comma
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-02-2013, 09:44 AM
  7. Replies: 0
    Last Post: 08-08-2005, 01:05 PM

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