Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ConfusedNHouston
 
Posts: n/a
Default Copy String to the Right of "hyphen"

I have a column of data that includes a product name along with a code for a
particular container type. The name and code are separated by a hyphen. For
example AB1222-10, AB1222-330OW, AB1222-330OWPCFL.

As you can see, the string to the right of the hyphen varies in length and
it can be either alpha, numeric, or a mix.

How can I generate a column that contains only the text to the right of the
hyphen? Example (based on above): 10, 330OW, 330OWPCFL as cell values in
the column.

Thank you....
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Copy String to the Right of "hyphen"

One way:
=RIGHT(A1,LEN(A1)-SEARCH("-",A1))

another if that stuff to the right is less than 255 characters:
=MID(A1,SEARCH("-",A1)+1,255)




ConfusedNHouston wrote:

I have a column of data that includes a product name along with a code for a
particular container type. The name and code are separated by a hyphen. For
example AB1222-10, AB1222-330OW, AB1222-330OWPCFL.

As you can see, the string to the right of the hyphen varies in length and
it can be either alpha, numeric, or a mix.

How can I generate a column that contains only the text to the right of the
hyphen? Example (based on above): 10, 330OW, 330OWPCFL as cell values in
the column.

Thank you....


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Copy String to the Right of "hyphen"

DataText to ColumnsDelimited by "Other" which is a hyphen.

At third step, choose to skip left-most column.


Gord Dibben MS Excel MVP

On Mon, 1 May 2006 09:02:02 -0700, ConfusedNHouston
wrote:

I have a column of data that includes a product name along with a code for a
particular container type. The name and code are separated by a hyphen. For
example AB1222-10, AB1222-330OW, AB1222-330OWPCFL.

As you can see, the string to the right of the hyphen varies in length and
it can be either alpha, numeric, or a mix.

How can I generate a column that contains only the text to the right of the
hyphen? Example (based on above): 10, 330OW, 330OWPCFL as cell values in
the column.

Thank you....


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
Disable Cut & Copy then restore on exiting sparx Excel Discussion (Misc queries) 0 April 30th 06 08:43 PM
Copy a string text to cell if another cell not empty Pasmatos Excel Discussion (Misc queries) 0 November 25th 05 03:54 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Updating master workbook from source that may/may not exist [email protected] Excel Worksheet Functions 20 April 7th 05 03:37 PM
how to copy 2350 hyperlink full paths to any column in a worksheet ? kontiki Excel Discussion (Misc queries) 4 December 10th 04 10:00 PM


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