Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default left and right functions

I have cells that contain statements like ASL- Auto Selection Logic. I need
to take that cell and break it into two cells. One cell would be ASL and hte
other would be Auto Selection Logic. There is no standard length of words or
characters so I need to key off of the - in the line. Also, some of the lines
have multiple - in them so I need to look for the first - from the left and
go from there.

Can anyone help me?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default left and right functions

hshayhorn wrote:
I have cells that contain statements like ASL- Auto Selection Logic. I need
to take that cell and break it into two cells. One cell would be ASL and hte
other would be Auto Selection Logic. There is no standard length of words or
characters so I need to key off of the - in the line. Also, some of the lines
have multiple - in them so I need to look for the first - from the left and
go from there.

Can anyone help me?



=TRIM(LEFT(A1,FIND("-",A1)-1))
=TRIM(MID(A1,FIND("-",A1)+1,9999))
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default left and right functions

=LEFT(A1,FIND("-",A1)-1)

the above will return what's left of the first hyphen


=MID(A1,FIND("-",A1)+1,255)

will return what's to the right, if you have more than 255 character change
that accordingly

--


Regards,


Peo Sjoblom

"hshayhorn" wrote in message
...
I have cells that contain statements like ASL- Auto Selection Logic. I need
to take that cell and break it into two cells. One cell would be ASL and
hte
other would be Auto Selection Logic. There is no standard length of words
or
characters so I need to key off of the - in the line. Also, some of the
lines
have multiple - in them so I need to look for the first - from the left
and
go from there.

Can anyone help me?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default left and right functions

menu DataText To ColumnsDelimited with a delimiter of "-"

--
__________________________________
HTH

Bob

"hshayhorn" wrote in message
...
I have cells that contain statements like ASL- Auto Selection Logic. I need
to take that cell and break it into two cells. One cell would be ASL and
hte
other would be Auto Selection Logic. There is no standard length of words
or
characters so I need to key off of the - in the line. Also, some of the
lines
have multiple - in them so I need to look for the first - from the left
and
go from there.

Can anyone help me?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default left and right functions

if ASL- Auto Selection Logic is in cell a1...
ASL:
=trim(LEFT(A1,FIND("-",A1)-1))
Auto Selection Logic:
=trim(RIGHT(A1,LEN(A1) - FIND("-",A1)))

--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"hshayhorn" wrote:

I have cells that contain statements like ASL- Auto Selection Logic. I need
to take that cell and break it into two cells. One cell would be ASL and hte
other would be Auto Selection Logic. There is no standard length of words or
characters so I need to key off of the - in the line. Also, some of the lines
have multiple - in them so I need to look for the first - from the left and
go from there.

Can anyone help me?




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
Using MID/LEFT functions to customize data Shams Excel Discussion (Misc queries) 4 November 2nd 07 07:47 PM
Using Left/Mid functions to format download Shams Excel Worksheet Functions 2 November 2nd 07 06:27 PM
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
LEFT / RIGHT functions Kevin G Excel Worksheet Functions 3 April 6th 06 11:01 PM
LEFT, MID functions? Lindsey M Excel Worksheet Functions 6 March 16th 05 08:44 PM


All times are GMT +1. The time now is 07:11 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"