Extracting numbers from a string
MZ Tools makes life easier for the Excel VBA coder
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Extracting numbers from a string

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Mike
    Posts
    796
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Take 123456789
    I want to extract each number into 9 consecutive cells.
    1 will be in A1,
    2 will end up in B1,
    etc.

    How can I accomplish this. I've tried different
    things using the RIGHT function, but I'm stuck.

    Need your help,
    Thanks,
    Zac

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    81,821
    Post Thanks / Like
    Mentioned
    12 Post(s)
    Tagged
    1 Thread(s)

    Default

    Zac,

    Lets say that the target number is in A1.

    In B1 enter:

    =MID($A$1,COLUMN()-1,1)

    and copy across as far as needed.

    Or use Data|Text to Columns, where you choose 'Fixed Width' and bring break lines between each digit by clicking at desired locations.

    Aladin

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Mike
    Posts
    796
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I'll try it later on, thanks.
    Have a meeting from 8:00 till 4:00 today.


User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com