+ Reply to Thread
Results 1 to 10 of 10

How to separate numbers from text??

  1. #1
    gmoexcel
    Guest

    How to separate numbers from text??

    Here are my sample cells:


    A---------------B---------------C------------D
    ABA_______________________________123456789SMITH
    ABA
    ABA
    ABA
    ABA

    I want to go from the example at the top to the example at the bottom. I would like to be able to separate the numbers and text that are in column D. The text will go to column B and the text (name) will go to column C. Is there a function or formula that will allow me to separate numbers from text?

    A---------------B---------------C------------D
    ABA______123456789_____SMITH______
    ABA
    ABA
    ABA
    ABA


    PD: How the heck can I post a sample that looks like a spreadsheet????
    Last edited by gmoexcel; 02-17-2006 at 11:22 AM.

  2. #2
    TRESSA WYKOFF
    Guest

    RE: How to separate numbers from text??

    It looks like there is if you have the same number of numbers and letters in
    each one you're trying to split. In the 'test' category of formulas, there
    are two functions called 'left' and 'right'. You could use "left" to split
    the first set of numbers and the "right" function in the other cell for the
    last set of letters. I hope this helps.

    I posted the question about the formula gliche right before yours. Is your
    copy formula function working properly?

    "gmoexcel" wrote:

    >
    > Here are my sample cells:
    >
    >
    > A B C D
    > ABA 123456789SMITH
    > ABA
    > ABA
    > ABA
    > ABA
    >
    > I want to go from the example at the top to the example
    > at the bottom. Is there a function or formula that will allow
    > me to separate numbers from text?
    >
    > A B C D
    > ABA 123456789 SMITH
    > ABA
    > ABA
    > ABA
    > ABA
    >
    >
    > --
    > gmoexcel
    > ------------------------------------------------------------------------
    > gmoexcel's Profile: http://www.excelforum.com/member.php...o&userid=23324
    > View this thread: http://www.excelforum.com/showthread...hreadid=513675
    >
    >


  3. #3
    Bernard Liengme
    Guest

    Re: How to separate numbers from text??

    When you show just one example lots of questions are unanswered.
    Do you always have 9 digits before the text?
    Is the ABA part of the entry or is 123456789SMITH in a cell on its own?
    Have you experimented with Data | Text to Columns ?
    come back and we will try to help
    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    "gmoexcel" <gmoexcel.23dpum_1140189001.9415@excelforum-nospam.com> wrote in
    message news:gmoexcel.23dpum_1140189001.9415@excelforum-nospam.com...
    >
    > Here are my sample cells:
    >
    >
    > A B C D
    > ABA 123456789SMITH
    > ABA
    > ABA
    > ABA
    > ABA
    >
    > I want to go from the example at the top to the example
    > at the bottom. Is there a function or formula that will allow
    > me to separate numbers from text?
    >
    > A B C D
    > ABA 123456789 SMITH
    > ABA
    > ABA
    > ABA
    > ABA
    >
    >
    > --
    > gmoexcel
    > ------------------------------------------------------------------------
    > gmoexcel's Profile:
    > http://www.excelforum.com/member.php...o&userid=23324
    > View this thread: http://www.excelforum.com/showthread...hreadid=513675
    >




  4. #4
    gmoexcel
    Guest
    Yes there is always 9 digits on the left of the text, that's why I went from 1 to 9 as in a SSN. Never mind the ABA, has nothing to do with the question. 123456789SMITH is a cell on its own, that is the one I am attempting to separate.

    What is Data | Text to Columns ?

    This is starting to get very complicated.

    gmo

    >When you show just one example lots of questions are unanswered.
    >Do you always have 9 digits before the text?
    >Is the ABA part of the entry or is 123456789SMITH in a cell on its own?
    >Have you experimented with Data | Text to Columns ?
    >come back and we will try to help

  5. #5
    Dave O
    Guest

    Re: How to separate numbers from text??

    Not to be contrary, but since there are *always* 9 digits on the left,
    it becomes much simpler. With one of your entries in cell A1, try this
    in cell B1:
    =LEFT(A1,9)
    .... and this in cell C1:
    =MID(A1,10,LEN(A1))

    Or, to get trickier and put the SSN into typical format, try this in
    cell B1:
    =MID(A1,1,3)&"-"&MID(A1,4,2)&"-"&MID(A1,6,4)
    .... and the earlier mentioned formula in C1.


  6. #6
    gmoexcel
    Guest

    This worked like a charm

    Quote Originally Posted by Dave O
    Not to be contrary, but since there are *always* 9 digits on the left,
    it becomes much simpler. With one of your entries in cell A1, try this
    in cell B1:
    =LEFT(A1,9)
    .... and this in cell C1:
    =MID(A1,10,LEN(A1))

    Or, to get trickier and put the SSN into typical format, try this in
    cell B1:
    =MID(A1,1,3)&"-"&MID(A1,4,2)&"-"&MID(A1,6,4)
    .... and the earlier mentioned formula in C1.
    This really helped. You saved us many hours of work. In the future I will try to be more detailed. It would help if there was a way to paste spreadsheets on this forum.

  7. #7
    Dave O
    Guest

    Re: How to separate numbers from text??

    Glad this was helpful to you! The LEFT and MID functions in Excel are
    just two examples of the many functions that parse data- it may be
    useful for you and your team to learn about these functions if you
    anticipate similar work in the future.


  8. #8
    gmoexcel
    Guest

    #VALUE error when using RIGHT function

    Quote Originally Posted by Dave O
    Glad this was helpful to you! The LEFT and MID functions in Excel are
    just two examples of the many functions that parse data- it may be
    useful for you and your team to learn about these functions if you
    anticipate similar work in the future.

    Actually I have tried to use the RIGHT function to parse a column of numbers but I keep getting a #VALUE error.

    The data was imported from a report and was originally formatted like this: 1.22005E+16. In Excel we reformatted it to a number, now it looks like this: 12200500001044000. Which is actually a combination of date an dollar amount.

    What I am intenting to do is to add the last 7 digits from the right and get my totals that way, then get rid of the first 10 digits. I have tried several different functions but I always get the #VALUE error. Any help will be greatly appreciated.

  9. #9
    Dave O
    Guest

    Re: How to separate numbers from text??

    Hi, sorry for the delayed response! I didn't notice you'd posted
    again.

    In your example, 12200500001044000, the first 6 columns are the date
    stamp, presumably 12/20/2005. But the string itself is 17 characters
    long, so just to be all inclusive you don't want those 7 characters
    (altho you do for this example), but instead the rightmost 11
    characters:
    =RIGHT(A1,11)
    This returns a text string, which will not provide any useable
    information to a math formula. So nest in the VALUE formula to convert
    the text to a value:
    =VALUE(RIGHT(A1,11))


  10. #10
    Dave O
    Guest

    Re: How to separate numbers from text??

    And totally by the way, you can convert the datestamp (assuming it
    means (in this example) 12/20/2005) to an Excel readable date with this
    formula:
    =DATEVALUE(MID(A1,1,2)&"/"&MID(A1,3,2)&"/"&MID(A1,5,2))
    .... and format the results as a date.


+ 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