Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Help putting left, right, find and len together

I need to pull the following string apart in several different ways and I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75, and
200 and put them in separate cells. character counts will not always be the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything out
to the right of the space.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Help putting left, right, find and len together

=MID(A2,FIND(" ",A2)+1,FIND("X",A2)-FIND(" ",A2)-1)

=MID(A2,FIND("X",A2)+1,FIND("X",A2,FIND("X",A2)+1)-FIND("X",A2)-1)

=MID(A2,FIND("X",A2,FIND("X",A2)+1)+1,FIND("
",A2,FIND("X",A2,FIND("X",A2)+1)-FIND("X",A2)-1))

=MID(A2,FIND(" ",A2,FIND(" ",A2)+1)+1,FIND(" ",A2,FIND(" ",A2,FIND("
",A2)+1)+1-FIND(" ",A2,FIND(" ",A2)+1))-1)

=RIGHT(A2,LEN(A2)-FIND(" ",A2,FIND(" ",A2,FIND(" ",A2)+1)+1))

Yowza!
"Glenda" wrote:

I need to pull the following string apart in several different ways and I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75, and
200 and put them in separate cells. character counts will not always be the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything out
to the right of the space.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Help putting left, right, find and len together

Hi,
Try these

for 5
=MID(A1,SEARCH(" ",A1)+1,SEARCH("x",A1)-(SEARCH(" ",A1)+1))

For 75
=MID(A1,SEARCH("x",A1)+1,SEARCH("x",A1,SEARCH("x", A1)+1)-(SEARCH("x",A1)+1))

For 200
=MID(A1,SEARCH("x",A1,SEARCH("x",A1)+1)+1,SEARCH(" ",A1,SEARCH("
",A1)+1)-(SEARCH("x",A1,SEARCH("x",A1)+1)+1))

For the right bit
=MID(A1,SEARCH(" ",A1,SEARCH(" ",A1,SEARCH(" ",A1)+1)+1),LEN(A1))

Mike


"Glenda" wrote:

I need to pull the following string apart in several different ways and I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75, and
200 and put them in separate cells. character counts will not always be the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything out
to the right of the space.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Help putting left, right, find and len together

Hi Glenda,

I put your example in A1 and went to DataText to Columns
Checked Delimited and Next
Checked Space and checked Other and put an X in the input box
then clicked Finish.

I ended up with
AB | 5 | 75 | 200 | YD | G5487L
in A1 to F1.

Is that what you are looking for?

HTH
Martin



"Glenda" wrote in message
...
I need to pull the following string apart in several different ways and I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75,
and
200 and put them in separate cells. character counts will not always be
the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything
out
to the right of the space.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Help putting left, right, find and len together

Now that is taking all the fun out! That's a lot easier....

"MartinW" wrote:

Hi Glenda,

I put your example in A1 and went to DataText to Columns
Checked Delimited and Next
Checked Space and checked Other and put an X in the input box
then clicked Finish.

I ended up with
AB | 5 | 75 | 200 | YD | G5487L
in A1 to F1.

Is that what you are looking for?

HTH
Martin



"Glenda" wrote in message
...
I need to pull the following string apart in several different ways and I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75,
and
200 and put them in separate cells. character counts will not always be
the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything
out
to the right of the space.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Help putting left, right, find and len together

Easier? Yes.
But is it what Glenda is trying to achieve?
That, we don't know yet.

Regards
Martin

"Sean Timmons" wrote in message
...
Now that is taking all the fun out! That's a lot easier....

"MartinW" wrote:

Hi Glenda,

I put your example in A1 and went to DataText to Columns
Checked Delimited and Next
Checked Space and checked Other and put an X in the input box
then clicked Finish.

I ended up with
AB | 5 | 75 | 200 | YD | G5487L
in A1 to F1.

Is that what you are looking for?

HTH
Martin



"Glenda" wrote in message
...
I need to pull the following string apart in several different ways and
I
can't get the combination of the functions right for it to work.

example of string:
AB 5X75X200 YD G5487L

First - I want to look at the string and pull out the dimensions 5, 75,
and
200 and put them in separate cells. character counts will not always
be
the
same

Second - YD may not always be YD it could also be LY

Third - I need to start at the right find the space and pull everything
out
to the right of the space.






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
How do I find max then sum cells above & to the left? Iany Excel Worksheet Functions 5 December 22nd 07 12:32 AM
Use of Find with Left, Mid, Right functions in nested IF(and('s MJW[_2_] Excel Discussion (Misc queries) 8 September 20th 07 09:22 PM
TO FIND VALUE TO THE LEFT THE CELL USING VLOOKUP OR ANY OTHER CAPTGNVR Excel Discussion (Misc queries) 10 February 14th 07 11:16 PM
Find LARGE, and th cell 3 cells to the left? Intotao Excel Worksheet Functions 1 January 9th 06 09:33 PM
FIND or LEFT or MID to swap first name with last name? Alice Excel Worksheet Functions 3 January 14th 05 10:17 PM


All times are GMT +1. The time now is 10:35 AM.

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

About Us

"It's about Microsoft Excel"