+ Reply to Thread
Results 1 to 5 of 5

Separating data from a cell

  1. #1
    Todd
    Guest

    Separating data from a cell

    I have data that is copied and pasted into Excel from another software
    program. The problem is that it will only copy over as unfomatted text so I
    get one long string of data in just one column. There are 2 pieces of data
    that I need to pull from this string.

    The first is a piece of cake because it is just the first 5 characters of
    the cell so I just made a formula in B1 that says "= left (A1 , 5)"

    The second one is what I'm having trouble with. The first character of the
    data I need to pull is always the 2nd dollar ($) sign in the string. The
    end is always 2 characters after the 4th decimal (.) in the string. Does
    anyone know how to put this into a formula or create some VBA that will
    accomplish this? Thanks!!!



  2. #2
    Bob Umlas
    Guest

    Re: Separating data from a cell

    If the cell in questino is A1:
    =MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTITUT
    E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))

    Bob Umlas
    Excel MVP

    "Todd" <[email protected]> wrote in message
    news:%[email protected]...
    > I have data that is copied and pasted into Excel from another software
    > program. The problem is that it will only copy over as unfomatted text so

    I
    > get one long string of data in just one column. There are 2 pieces of

    data
    > that I need to pull from this string.
    >
    > The first is a piece of cake because it is just the first 5 characters of
    > the cell so I just made a formula in B1 that says "= left (A1 , 5)"
    >
    > The second one is what I'm having trouble with. The first character of

    the
    > data I need to pull is always the 2nd dollar ($) sign in the string. The
    > end is always 2 characters after the 4th decimal (.) in the string. Does
    > anyone know how to put this into a formula or create some VBA that will
    > accomplish this? Thanks!!!
    >
    >




  3. #3
    Todd
    Guest

    Re: Separating data from a cell

    Wow! You're awesome! I just have one small problem. Excel is not treating
    the data as numbers... I can't "Sum" the column. Is there a way to make the
    data calculateable (if that is a word)?




    "Bob Umlas" <[email protected]> wrote in message
    news:[email protected]...
    > If the cell in questino is A1:
    > =MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTITUT
    > E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))
    >
    > Bob Umlas
    > Excel MVP
    >
    > "Todd" <[email protected]> wrote in message
    > news:%[email protected]...
    >> I have data that is copied and pasted into Excel from another software
    >> program. The problem is that it will only copy over as unfomatted text
    >> so

    > I
    >> get one long string of data in just one column. There are 2 pieces of

    > data
    >> that I need to pull from this string.
    >>
    >> The first is a piece of cake because it is just the first 5 characters of
    >> the cell so I just made a formula in B1 that says "= left (A1 , 5)"
    >>
    >> The second one is what I'm having trouble with. The first character of

    > the
    >> data I need to pull is always the 2nd dollar ($) sign in the string. The
    >> end is always 2 characters after the 4th decimal (.) in the string. Does
    >> anyone know how to put this into a formula or create some VBA that will
    >> accomplish this? Thanks!!!
    >>
    >>

    >
    >




  4. #4
    Bob Umlas
    Guest

    Re: Separating data from a cell

    Multiply by 1. That is, 1*the formulas I gave you. Like
    =1*MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTIT
    UT
    > > E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))


    "Todd" <[email protected]> wrote in message
    news:[email protected]...
    > Wow! You're awesome! I just have one small problem. Excel is not

    treating
    > the data as numbers... I can't "Sum" the column. Is there a way to make

    the
    > data calculateable (if that is a word)?
    >
    >
    >
    >
    > "Bob Umlas" <[email protected]> wrote in message
    > news:[email protected]...
    > > If the cell in questino is A1:
    > >

    =MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTITUT
    > > E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))
    > >
    > > Bob Umlas
    > > Excel MVP
    > >
    > > "Todd" <[email protected]> wrote in message
    > > news:%[email protected]...
    > >> I have data that is copied and pasted into Excel from another software
    > >> program. The problem is that it will only copy over as unfomatted text
    > >> so

    > > I
    > >> get one long string of data in just one column. There are 2 pieces of

    > > data
    > >> that I need to pull from this string.
    > >>
    > >> The first is a piece of cake because it is just the first 5 characters

    of
    > >> the cell so I just made a formula in B1 that says "= left (A1 , 5)"
    > >>
    > >> The second one is what I'm having trouble with. The first character of

    > > the
    > >> data I need to pull is always the 2nd dollar ($) sign in the string.

    The
    > >> end is always 2 characters after the 4th decimal (.) in the string.

    Does
    > >> anyone know how to put this into a formula or create some VBA that will
    > >> accomplish this? Thanks!!!
    > >>
    > >>

    > >
    > >

    >
    >




  5. #5
    Todd
    Guest

    Re: Separating data from a cell

    Thanks again!!!


    "Bob Umlas" <[email protected]> wrote in message
    news:[email protected]...
    > Multiply by 1. That is, 1*the formulas I gave you. Like
    > =1*MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTIT
    > UT
    >> > E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))

    >
    > "Todd" <[email protected]> wrote in message
    > news:[email protected]...
    >> Wow! You're awesome! I just have one small problem. Excel is not

    > treating
    >> the data as numbers... I can't "Sum" the column. Is there a way to make

    > the
    >> data calculateable (if that is a word)?
    >>
    >>
    >>
    >>
    >> "Bob Umlas" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > If the cell in questino is A1:
    >> >

    > =MID(A1,FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)),FIND(CHAR(21),SUBSTITUT
    >> > E(A1,".",CHAR(21),4))+3-FIND(CHAR(17),SUBSTITUTE(A1,"$",CHAR(17),2)))
    >> >
    >> > Bob Umlas
    >> > Excel MVP
    >> >
    >> > "Todd" <[email protected]> wrote in message
    >> > news:%[email protected]...
    >> >> I have data that is copied and pasted into Excel from another software
    >> >> program. The problem is that it will only copy over as unfomatted
    >> >> text
    >> >> so
    >> > I
    >> >> get one long string of data in just one column. There are 2 pieces of
    >> > data
    >> >> that I need to pull from this string.
    >> >>
    >> >> The first is a piece of cake because it is just the first 5 characters

    > of
    >> >> the cell so I just made a formula in B1 that says "= left (A1 , 5)"
    >> >>
    >> >> The second one is what I'm having trouble with. The first character
    >> >> of
    >> > the
    >> >> data I need to pull is always the 2nd dollar ($) sign in the string.

    > The
    >> >> end is always 2 characters after the 4th decimal (.) in the string.

    > Does
    >> >> anyone know how to put this into a formula or create some VBA that
    >> >> will
    >> >> accomplish this? 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