Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Lindsey M
 
Posts: n/a
Default 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   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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   Report Post  
Lindsey M
 
Posts: n/a
Default

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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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   Report Post  
Lindsey M
 
Posts: n/a
Default

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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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" wrote in message
...
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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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<attarkon.ee
Arvi Laanemets


"Lindsey M" wrote in message
...
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   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 16 Mar 2005 04:33:01 -0800, Lindsey M
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 questions about automated c++ com add-in worksheet functions gert Excel Worksheet Functions 0 March 10th 05 09:57 AM
The left function does not work when displaying times, how is thi. Nambo27 Excel Worksheet Functions 3 February 25th 05 06:46 PM
# of Functions per cell SUB-ZERO Excel Worksheet Functions 3 January 23rd 05 10:35 PM
PivotTable canned functions doco Excel Discussion (Misc queries) 0 January 14th 05 03:52 PM
How to load Engineering Functions into the Fx function wizard? jsaval Excel Worksheet Functions 1 November 11th 04 09:47 PM


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"