+ Reply to Thread
Results 1 to 7 of 7

Separate Text & Number

  1. #1
    Registered User
    Join Date
    01-26-2014
    Location
    St. Louis
    MS-Off Ver
    Excel 2003
    Posts
    3

    Separate Text & Number

    I'm trying to separate text from numbers into two separate cells...

    Essentially, I would like the users to copy and paste data into Column A, as seen below. Then, hopefully by formula separate the text characters into Column B and the numbers into Column C.


    Input: Output 1: Output 2:

    Col A Col B Col C
    Wells 123 Wells 123
    Wells 1234 Wells 1234
    Wells Fargo 123 Wells Fargo 123
    Wells Fargo 1234 Wells Fargo 1234
    Wells Fargo Inc 123 Wells Fargo Inc 123
    Wells Fargo Inc 1234 Wells Fargo Inc 1234

    Ideally, I would like to do this with a formula... Any help?

    Thanks!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Separate Text & Number

    Try this...

    Data Range
    A
    B
    C
    2
    Wells 123
    Wells
    123
    3
    Wells 1234
    Wells
    1234
    4
    Wells Fargo 123
    Wells Fargo
    123
    5
    Wells Fargo 1234
    Wells Fargo
    1234
    6
    Wells Fargo Inc 123
    Wells Fargo Inc
    123
    7
    Wells Fargo Inc 1234
    Wells Fargo Inc
    1234


    Enter this formula in C2:

    =--TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))

    Enter this formula in B2:

    =TRIM(SUBSTITUTE(A2,C2,""))

    Select B2:C2 and copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-26-2014
    Location
    St. Louis
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Separate Text & Number

    Thanks for your help! I realized my issue is a little more calculated than that... For example...

    Is there a consistent formula to use to still separate text from the number string?

    wells fargo 123
    wells fargo 1234
    wells fargo inc 123 456 789
    wells fargo 98 999 22

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Separate Text & Number

    this should work with all strings

    =REPLACE(A1,1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1,"")

    A
    B
    1
    wells fargo 123 123
    2
    wells fargo 1234 1234
    3
    wells fargo inc 123 456 789 123 456 789
    4
    wells fargo 98 999 22 98 999 22
    5
    Wells 123 123
    6
    Wells 1234 1234
    7
    Wells Fargo 123 123
    8
    Wells Fargo 1234 1234
    9
    Wells Fargo Inc 123 123
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    01-26-2014
    Location
    St. Louis
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Separate Text & Number

    That works perfectly! Thank you for your quick response!!

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Separate Text & Number

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Separate Text & Number

    Change the formula in C2 to:

    =MID(A2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A2&1234567890)),20)

+ 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. How do I separate text from a phone number in one cell?
    By watchoverme in forum Excel General
    Replies: 21
    Last Post: 01-12-2014, 05:32 PM
  2. [SOLVED] Formula to separate number from text
    By alcharbonneau in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2013, 06:13 PM
  3. [SOLVED] separate text, number
    By marreco in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2012, 09:09 AM
  4. Exporting large number of columns along with 1 fixed column into separate text files
    By akshaynr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2010, 11:08 AM
  5. separate text & number string and performance calculation
    By ranee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2010, 03:33 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