+ Reply to Thread
Results 1 to 7 of 7

LEFT, MID functions?

Hybrid View

Guest LEFT, MID functions? 03-16-2005, 09:06 AM
Guest Re: LEFT, MID functions? 03-16-2005, 09:06 AM
Guest Re: LEFT, MID functions? 03-16-2005, 09:25 AM
Guest Re: LEFT, MID functions? 03-16-2005, 10:06 AM
Guest Re: LEFT, MID functions? 03-16-2005, 11:06 AM
Guest Re: LEFT, MID functions? 03-16-2005, 02:06 PM
Guest Re: LEFT, MID functions? 03-16-2005, 05:06 PM
  1. #1
    Lindsey M
    Guest

    LEFT, MID functions?

    Hi

    Say I have the following in cell G3:

    15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin

    I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works, problem
    is, the name won't always be 8 chars long, so is there any way that I can set
    it so that it counts all chars of the name until it comes to the space and
    then inserts that?
    I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    assuming that once B3 is sorted, it will work around that?
    And finally, D3 = Lindsey Martin. I know I can use the RIGHT function for
    this one, but again, the chars of this one will differ (eg Claire Dunn
    instead of Lindsey Martin), any ideas on this one?

    Any help would be greatly appreciated

    Cheers
    Linds

  2. #2
    Arvi Laanemets
    Guest

    Re: LEFT, MID functions?

    Hi

    B3=MID(TRIM(SUBSTITUTE($G3,A3,"")),1,FIND("
    ",TRIM(SUBSTITUTE($G3,A3,"")))-1)
    C3=MID(TRIM(SUBSTITUTE($G3,A3 &" " & B3,"")),1,FIND("
    ",TRIM(SUBSTITUTE($G3,A3 &" " & B3;"")),10)-1)
    D3=TRIM(SUBSTITUTE(G3,A3 & " " & B3 & " " &C3,""))

    --
    When sending mail, use address arvil<at>tarkon.ee
    Arvi Laanemets


    "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    news:98ACDBAD-C25E-4F4E-933A-4F02C0A9692F@microsoft.com...
    > Hi
    >
    > Say I have the following in cell G3:
    >
    > 15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    >
    > I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    > I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works, problem
    > is, the name won't always be 8 chars long, so is there any way that I can

    set
    > it so that it counts all chars of the name until it comes to the space and
    > then inserts that?
    > I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    > assuming that once B3 is sorted, it will work around that?
    > And finally, D3 = Lindsey Martin. I know I can use the RIGHT function for
    > this one, but again, the chars of this one will differ (eg Claire Dunn
    > instead of Lindsey Martin), any ideas on this one?
    >
    > Any help would be greatly appreciated
    >
    > Cheers
    > Linds




  3. #3
    Lindsey M
    Guest

    Re: LEFT, MID functions?

    Hi Avri

    Thanks for your quick response, however, the first one (B3) just returns a
    blank cell and when I enter the formula in C3 it comes up with an error

    Sorry to be a pain, but any ideas?

    Linds

    "Arvi Laanemets" wrote:

    > Hi
    >
    > B3=MID(TRIM(SUBSTITUTE($G3,A3,"")),1,FIND("
    > ",TRIM(SUBSTITUTE($G3,A3,"")))-1)
    > C3=MID(TRIM(SUBSTITUTE($G3,A3 &" " & B3,"")),1,FIND("
    > ",TRIM(SUBSTITUTE($G3,A3 &" " & B3;"")),10)-1)
    > D3=TRIM(SUBSTITUTE(G3,A3 & " " & B3 & " " &C3,""))
    >
    > --
    > When sending mail, use address arvil<at>tarkon.ee
    > Arvi Laanemets
    >
    >
    > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > news:98ACDBAD-C25E-4F4E-933A-4F02C0A9692F@microsoft.com...
    > > Hi
    > >
    > > Say I have the following in cell G3:
    > >
    > > 15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    > >
    > > I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    > > I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works, problem
    > > is, the name won't always be 8 chars long, so is there any way that I can

    > set
    > > it so that it counts all chars of the name until it comes to the space and
    > > then inserts that?
    > > I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    > > assuming that once B3 is sorted, it will work around that?
    > > And finally, D3 = Lindsey Martin. I know I can use the RIGHT function for
    > > this one, but again, the chars of this one will differ (eg Claire Dunn
    > > instead of Lindsey Martin), any ideas on this one?
    > >
    > > Any help would be greatly appreciated
    > >
    > > Cheers
    > > Linds

    >
    >
    >


  4. #4
    Arvi Laanemets
    Guest

    Re: LEFT, MID functions?

    Hi

    Is the date in A3 remained as text, or did you convert it to date? What does
    the formula
    =TRIM(SUBSTITUTE($G3,A3,""))
    return. It must return "Stevens Feb 22 2005 Lindsey Martin" - when not, then
    try with
    =TRIM(SUBSTITUTE($G3,TEXT(A3,"dd.mm.yy hh:mm:ss"),""))
    or
    =TRIM(SUBSTITUTE($G3,TEXT(A3*1,"dd.mm.yy hh:mm:ss"),""))

    --
    When sending mail, use address arvil<at>tarkon.ee
    Arvi Laanemets


    "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    news:BDE28CC3-33E4-4CC8-B328-B8EB580D14F6@microsoft.com...
    > Hi Avri
    >
    > Thanks for your quick response, however, the first one (B3) just returns a
    > blank cell and when I enter the formula in C3 it comes up with an error
    >
    > Sorry to be a pain, but any ideas?
    >
    > Linds
    >
    > "Arvi Laanemets" wrote:
    >
    > > Hi
    > >
    > > B3=MID(TRIM(SUBSTITUTE($G3,A3,"")),1,FIND("
    > > ",TRIM(SUBSTITUTE($G3,A3,"")))-1)
    > > C3=MID(TRIM(SUBSTITUTE($G3,A3 &" " & B3,"")),1,FIND("
    > > ",TRIM(SUBSTITUTE($G3,A3 &" " & B3;"")),10)-1)
    > > D3=TRIM(SUBSTITUTE(G3,A3 & " " & B3 & " " &C3,""))
    > >
    > > --
    > > When sending mail, use address arvil<at>tarkon.ee
    > > Arvi Laanemets
    > >
    > >
    > > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > > news:98ACDBAD-C25E-4F4E-933A-4F02C0A9692F@microsoft.com...
    > > > Hi
    > > >
    > > > Say I have the following in cell G3:
    > > >
    > > > 15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    > > >
    > > > I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    > > > I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works,

    problem
    > > > is, the name won't always be 8 chars long, so is there any way that I

    can
    > > set
    > > > it so that it counts all chars of the name until it comes to the space

    and
    > > > then inserts that?
    > > > I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    > > > assuming that once B3 is sorted, it will work around that?
    > > > And finally, D3 = Lindsey Martin. I know I can use the RIGHT function

    for
    > > > this one, but again, the chars of this one will differ (eg Claire Dunn
    > > > instead of Lindsey Martin), any ideas on this one?
    > > >
    > > > Any help would be greatly appreciated
    > > >
    > > > Cheers
    > > > Linds

    > >
    > >
    > >




  5. #5
    Lindsey M
    Guest

    Re: LEFT, MID functions?

    Hi Arvi,

    The first statement does bring up Stevens Feb 22 2005 Lindsey Martin, so it
    must be the rest thats not working.

    Cheers
    Lindsey

    "Arvi Laanemets" wrote:

    > Hi
    >
    > Is the date in A3 remained as text, or did you convert it to date? What does
    > the formula
    > =TRIM(SUBSTITUTE($G3,A3,""))
    > return. It must return "Stevens Feb 22 2005 Lindsey Martin" - when not, then
    > try with
    > =TRIM(SUBSTITUTE($G3,TEXT(A3,"dd.mm.yy hh:mm:ss"),""))
    > or
    > =TRIM(SUBSTITUTE($G3,TEXT(A3*1,"dd.mm.yy hh:mm:ss"),""))
    >
    > --
    > When sending mail, use address arvil<at>tarkon.ee
    > Arvi Laanemets
    >
    >
    > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > news:BDE28CC3-33E4-4CC8-B328-B8EB580D14F6@microsoft.com...
    > > Hi Avri
    > >
    > > Thanks for your quick response, however, the first one (B3) just returns a
    > > blank cell and when I enter the formula in C3 it comes up with an error
    > >
    > > Sorry to be a pain, but any ideas?
    > >
    > > Linds
    > >
    > > "Arvi Laanemets" wrote:
    > >
    > > > Hi
    > > >
    > > > B3=MID(TRIM(SUBSTITUTE($G3,A3,"")),1,FIND("
    > > > ",TRIM(SUBSTITUTE($G3,A3,"")))-1)
    > > > C3=MID(TRIM(SUBSTITUTE($G3,A3 &" " & B3,"")),1,FIND("
    > > > ",TRIM(SUBSTITUTE($G3,A3 &" " & B3;"")),10)-1)
    > > > D3=TRIM(SUBSTITUTE(G3,A3 & " " & B3 & " " &C3,""))
    > > >
    > > > --
    > > > When sending mail, use address arvil<at>tarkon.ee
    > > > Arvi Laanemets
    > > >
    > > >
    > > > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > > > news:98ACDBAD-C25E-4F4E-933A-4F02C0A9692F@microsoft.com...
    > > > > Hi
    > > > >
    > > > > Say I have the following in cell G3:
    > > > >
    > > > > 15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    > > > >
    > > > > I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    > > > > I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works,

    > problem
    > > > > is, the name won't always be 8 chars long, so is there any way that I

    > can
    > > > set
    > > > > it so that it counts all chars of the name until it comes to the space

    > and
    > > > > then inserts that?
    > > > > I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    > > > > assuming that once B3 is sorted, it will work around that?
    > > > > And finally, D3 = Lindsey Martin. I know I can use the RIGHT function

    > for
    > > > > this one, but again, the chars of this one will differ (eg Claire Dunn
    > > > > instead of Lindsey Martin), any ideas on this one?
    > > > >
    > > > > Any help would be greatly appreciated
    > > > >
    > > > > Cheers
    > > > > Linds
    > > >
    > > >
    > > >

    >
    >
    >


  6. #6
    Arvi Laanemets
    Guest

    Re: LEFT, MID functions?

    Hi

    So continue with testing stepwise

    =FIND(" ",TRIM(SUBSTITUTE($G3,A3,"")))
    must return 8. When not, then probably you entered "" as first parameter
    instead " ".
    When this returns right number, and the whole formula in B3 doesn't return
    "Stevens", then you have misspelled something in MID function.

    Arvi Laanemets


    "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    news:5D495B4E-A1D3-4655-AD1A-7B52BCF1A8BF@microsoft.com...
    > Hi Arvi,
    >
    > The first statement does bring up Stevens Feb 22 2005 Lindsey Martin, so

    it
    > must be the rest thats not working.
    >
    > Cheers
    > Lindsey
    >
    > "Arvi Laanemets" wrote:
    >
    > > Hi
    > >
    > > Is the date in A3 remained as text, or did you convert it to date? What

    does
    > > the formula
    > > =TRIM(SUBSTITUTE($G3,A3,""))
    > > return. It must return "Stevens Feb 22 2005 Lindsey Martin" - when not,

    then
    > > try with
    > > =TRIM(SUBSTITUTE($G3,TEXT(A3,"dd.mm.yy hh:mm:ss"),""))
    > > or
    > > =TRIM(SUBSTITUTE($G3,TEXT(A3*1,"dd.mm.yy hh:mm:ss"),""))
    > >
    > > --
    > > When sending mail, use address arvil<at>tarkon.ee
    > > Arvi Laanemets
    > >
    > >
    > > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > > news:BDE28CC3-33E4-4CC8-B328-B8EB580D14F6@microsoft.com...
    > > > Hi Avri
    > > >
    > > > Thanks for your quick response, however, the first one (B3) just

    returns a
    > > > blank cell and when I enter the formula in C3 it comes up with an

    error
    > > >
    > > > Sorry to be a pain, but any ideas?
    > > >
    > > > Linds
    > > >
    > > > "Arvi Laanemets" wrote:
    > > >
    > > > > Hi
    > > > >
    > > > > B3=MID(TRIM(SUBSTITUTE($G3,A3,"")),1,FIND("
    > > > > ",TRIM(SUBSTITUTE($G3,A3,"")))-1)
    > > > > C3=MID(TRIM(SUBSTITUTE($G3,A3 &" " & B3,"")),1,FIND("
    > > > > ",TRIM(SUBSTITUTE($G3,A3 &" " & B3;"")),10)-1)
    > > > > D3=TRIM(SUBSTITUTE(G3,A3 & " " & B3 & " " &C3,""))
    > > > >
    > > > > --
    > > > > When sending mail, use address arvil<at>tarkon.ee
    > > > > Arvi Laanemets
    > > > >
    > > > >
    > > > > "Lindsey M" <LindseyM@discussions.microsoft.com> wrote in message
    > > > > news:98ACDBAD-C25E-4F4E-933A-4F02C0A9692F@microsoft.com...
    > > > > > Hi
    > > > > >
    > > > > > Say I have the following in cell G3:
    > > > > >
    > > > > > 15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    > > > > >
    > > > > > I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    > > > > > I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works,

    > > problem
    > > > > > is, the name won't always be 8 chars long, so is there any way

    that I
    > > can
    > > > > set
    > > > > > it so that it counts all chars of the name until it comes to the

    space
    > > and
    > > > > > then inserts that?
    > > > > > I want C3 = Feb 22 2005, i haven't worked this one out yet because

    I'm
    > > > > > assuming that once B3 is sorted, it will work around that?
    > > > > > And finally, D3 = Lindsey Martin. I know I can use the RIGHT

    function
    > > for
    > > > > > this one, but again, the chars of this one will differ (eg Claire

    Dunn
    > > > > > instead of Lindsey Martin), any ideas on this one?
    > > > > >
    > > > > > Any help would be greatly appreciated
    > > > > >
    > > > > > Cheers
    > > > > > Linds
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >




  7. #7
    Ron Rosenfeld
    Guest

    Re: LEFT, MID functions?

    On Wed, 16 Mar 2005 04:33:01 -0800, Lindsey M
    <LindseyM@discussions.microsoft.com> wrote:

    >Hi
    >
    >Say I have the following in cell G3:
    >
    >15.02.05 11:09:52 Stevens Feb 22 2005 Lindsey Martin
    >
    >I want A3 = 15.02.05 11:09:52 (so i use =LEFT(G3,17)
    >I want B3 = Stevens (so I've used =MID(G3, 19, 8) and this works, problem
    >is, the name won't always be 8 chars long, so is there any way that I can set
    >it so that it counts all chars of the name until it comes to the space and
    >then inserts that?
    >I want C3 = Feb 22 2005, i haven't worked this one out yet because I'm
    >assuming that once B3 is sorted, it will work around that?
    >And finally, D3 = Lindsey Martin. I know I can use the RIGHT function for
    >this one, but again, the chars of this one will differ (eg Claire Dunn
    >instead of Lindsey Martin), any ideas on this one?
    >
    >Any help would be greatly appreciated
    >
    >Cheers
    >Linds



    A3:

    =LEFT(TRIM(G3),FIND(CHAR(1),
    SUBSTITUTE(TRIM(G3)," ",CHAR(1),2))-1)

    B3:

    =MID(TRIM(G3),FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",
    CHAR(1),2))+1,FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",
    CHAR(1),3))-FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",CHAR(1),2))-1)

    C3:

    =MID(TRIM(G3),FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",
    CHAR(1),3))+1,FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",
    CHAR(1),6))-FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",CHAR(1),3))-1)

    D3:

    =MID(TRIM(G3),FIND(CHAR(1),SUBSTITUTE(TRIM(G3)," ",
    CHAR(1),6))+1,255)


    --ron

+ 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