+ Reply to Thread
Results 1 to 7 of 7

How to count comma-separated numbers from entire column showing result in another column

  1. #1
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    274

    How to count comma-separated numbers from entire column showing result in another column

    Good day,
    I am struggling to give a numbering to comma-separated numbers from the column A.
    The logic is very simple. The numbers should be sequentially numbered by their respective q-ty in each cell. For example:
    100 - 1
    100, 200 - 1, 2
    200, 300, 400, 500 - 1, 2, 3, 4
    500 -1 and etc.

    Desired output in column B.
    Perhaps the formula may or may not be simple, I just can't figure it out.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-22-2022
    Location
    India
    MS-Off Ver
    Microsoft office Home and Student 2019
    Posts
    61

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Hi,
    Try These formula. Also attached the sheet for reference.
    In cell B1 and drag down
    =TEXTJOIN(",",TRUE,C1:V1)

    In Cell C1 drag acrross and down
    =IF(IFERROR(FILTERXML("<A><B>"&SUBSTITUTE($A1,",","</B><B>")&"</B></A>","//B["&COLUMNS($B1:B1)&"]"),"")<>"",COLUMN()-2,"")
    Attached Files Attached Files
    Last edited by HariArvi; 08-10-2022 at 08:43 AM.

  3. #3
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    274

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Hi, the numbers should be displayed in the column. Pls. see the screenshot.
    P.S. Neither 2013 nor 2016 Excel versions have a TEXTJOIN function
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    06-22-2022
    Location
    India
    MS-Off Ver
    Microsoft office Home and Student 2019
    Posts
    61

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Hi,
    Try this formula.
    In cell B1 and drag
    =IF(ISERROR(FIND(",",A1))=TRUE,1,LEN(A1)-LEN(SUBSTITUTE(A1,",","")))

    Ignore the previous post. I assumed you wanted the sequence to be created.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,223

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Please try at B1

    =IFERROR(MOD(AGGREGATE(15,6,ROW($A$1:$A$4)*100+COLUMN($A$1:$Z$1)/(LEN($A$1:$A$4&0)-LEN(SUBSTITUTE($A$1:$A$4,",",))>=COLUMN($A$1:$Z$1)),ROWS(B$1:B1)),100),"")
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    274

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Sadly, no. Formula fails as soon as the range referenced by the formula ends. Please refer to the column B with correct values.
    Attached Images Attached Images

  7. #7
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    274

    Re: How to count comma-separated numbers from entire column showing result in another colu

    Bo_Ry, Yes, it works like a charm! Who could have doubted it? Thank you!
    Problem 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. Replies: 6
    Last Post: 06-30-2021, 03:19 PM
  2. [SOLVED] PQ sort numbers in comma separated column
    By Imbizile in forum Excel General
    Replies: 2
    Last Post: 02-28-2021, 11:12 AM
  3. Replies: 5
    Last Post: 04-19-2017, 03:18 PM
  4. 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
  5. Replies: 3
    Last Post: 09-25-2014, 02:14 PM
  6. Replies: 6
    Last Post: 12-17-2011, 04:58 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