+ Reply to Thread
Results 1 to 5 of 5

Split text and numbers into different cells

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Split text and numbers into different cells

    Hi there,

    I have data in a single column that looks sth like this:

    CTE_DIV_96657
    TOMMY_DIV_94434
    PHILLIP CHUA - DIV 95343

    As you can see, the text and numbers are seperated sometimes by spaces and sometimes by _ or -. I need to seperate this data into 3 seperate columns

    i.e. CTE | DIV | 96657

    Then, I need to highlight duplicates in the last column (96657,etc) without deleting the duplicates as would happen if I used Advanced Filter > Unique records only

    I have tried using the formula =RIGHT(A1,5), but I have no way of checking for duplicates by hightlighting repeated entries (I need to conditional format to detect duplicate numbers )

    Can anyone please help?

  2. #2
    Registered User
    Join Date
    02-25-2008
    Posts
    29

    Re: Split text and numbers into different cells

    Here by an example by formulas, see attached excel file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-11-2009
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Split text and numbers into different cells

    I see, thanks!

    Is there any way a general formula can be written to seperate text and numbers? Or does it all depend on the

    i. position of the characters
    ii. number of characters (text or nos)?

    thanks for the fast reply!

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Split text and numbers into different cells

    There are worksheet formulas that can extract the numeric digits from a string (eg see Ron Coderre's formula in the following:

    http://www.excelforum.com/excel-work...c-strings.html

    ), but text can be a problem. If you are open to using UDFs (ie macro code written as a function that you can also use in your worksheet) then this is pretty straightforward:

    Please Login or Register  to view this content.
    You would then use this in your wworksheet like:

    =ExtractCharacters(A1,1)

    If you wanted to extract digits from the A1 cell, or

    =ExtractCharacters(A1,0)

    If you wanted characters other than digits.

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  5. #5
    Registered User
    Join Date
    06-11-2009
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Split text and numbers into different cells

    ok, thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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