+ Reply to Thread
Results 1 to 5 of 5

How do I separate a column that contains a variable number of digits and chars?

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    2

    Lightbulb How do I separate a column that contains a variable number of digits and chars?

    Hello everyone,

    I have a column on a document that contains arrays in the following format: [variable_number_of_digits][variable_number_of_chars]. Example:

    123wordI
    3456word
    123wordw
    3456wordword
    65575word
    65784wordwordword

    How can I extract the numbers from that column? Note that the digits and chars are not mixed. I cannot use Split to columns or LEFT function due to the variable lenght. I managed, however, to separate them by filtering the column, manually checking the arrays containing only 3 digits, then I used LEFT function, then repeat for arrays with 4 digits, etc - but it takes a lot of time.

    Please help me solve this issue.



    Many thanks,
    Syno

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How do I separate a column that contains a variable number of digits and chars?

    See the attached file for the formula's .

    Dutch (for numbers)
    Please Login or Register  to view this content.
    Dutch (for text)
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    10-09-2013
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How do I separate a column that contains a variable number of digits and chars?

    Wow, amazing.
    You saved me a lot of time!
    Many many many thanks!!!!!!!!!!!!

    Is it too much if I ask you to explain the logic of the formula?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How do I separate a column that contains a variable number of digits and chars?

    Thanks for the reply.

    Glad I could help.

    The explaining I leave to other forummembers.

  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: How do I separate a column that contains a variable number of digits and chars?

    to get the number (any digits)
    =LEFT(A1,SUMPRODUCT((ISNUMBER(--MID(A1,ROW($1:$10),1))*1)))
    to get the text
    =SUBSTITUTE(A1;LEFT(A1;SUMPRODUCT((ISNUMBER(--MID(A1;ROW($1:$10);1))*1)))

+ 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] how do I take a two digit number, separate the two digits, add them together, show result
    By GregInLondon in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 09-20-2023, 01:00 PM
  2. Time Conversion - Variable Number of Digits
    By ExcelQuestFL in forum Excel General
    Replies: 8
    Last Post: 05-07-2012, 07:19 PM
  3. Replies: 2
    Last Post: 05-09-2011, 11:39 AM
  4. Replies: 5
    Last Post: 08-21-2010, 02:08 PM
  5. [SOLVED] Trying to find last 6 digits of variable number
    By Warhawk in forum Excel General
    Replies: 4
    Last Post: 03-07-2006, 10:15 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