Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ty ty is offline
external usenet poster
 
Posts: 19
Default Remove data that preceeds a character

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Remove data that preceeds a character

Try,
=RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1,"-","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))))

Mike

"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Remove data that preceeds a character

Try
=RIGHT(A2,LEN(A2)-FIND("^",SUBSTITUTE(A2,"-","^",4)))

assuming your text does not contain the character "^". If it does then you
will have to replace it with a character which will not be there...
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ty ty is offline
external usenet poster
 
Posts: 19
Default Remove data that preceeds a character

Mike,

Almost. This field has 4 hyphens in the beginning of the cell, followed by
the data I need and then followed by data with more hyphens that I also need.
This formula keeps only the data after the last hyphens.

Here's another example, maybe I didnt explain it well. (the items i want
removed are the abc-123's

abc-123-abc-123-KEEP THIS DATA AND KEEP THIS
DATA-CBA-321-CBA-321-CBA-321-KEEP THIS DATA AS WELL
--
Thanks, Ty


"Mike H" wrote:

Try,
=RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1,"-","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))))

Mike

"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ty ty is offline
external usenet poster
 
Posts: 19
Default Remove data that preceeds a character

Sheeloo, Nice work, that did it..

Ty
--
Thanks, Ty


"Sheeloo" wrote:

Try
=RIGHT(A2,LEN(A2)-FIND("^",SUBSTITUTE(A2,"-","^",4)))

assuming your text does not contain the character "^". If it does then you
will have to replace it with a character which will not be there...
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Remove data that preceeds a character


How can I remove all the data that preceeds the 4th and final hyphen


You explained yourself very well unfortunately the explanation had little to
do with what you actually wanted.

Mike

"Ty" wrote:

Mike,

Almost. This field has 4 hyphens in the beginning of the cell, followed by
the data I need and then followed by data with more hyphens that I also need.
This formula keeps only the data after the last hyphens.

Here's another example, maybe I didnt explain it well. (the items i want
removed are the abc-123's

abc-123-abc-123-KEEP THIS DATA AND KEEP THIS
DATA-CBA-321-CBA-321-CBA-321-KEEP THIS DATA AS WELL
--
Thanks, Ty


"Mike H" wrote:

Try,
=RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1,"-","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))))

Mike

"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ty ty is offline
external usenet poster
 
Posts: 19
Default Remove data that preceeds a character

Im not very good at this. Thanks again for your help, I really needed it
--
Thanks, Ty


"Mike H" wrote:


How can I remove all the data that preceeds the 4th and final hyphen


You explained yourself very well unfortunately the explanation had little to
do with what you actually wanted.

Mike

"Ty" wrote:

Mike,

Almost. This field has 4 hyphens in the beginning of the cell, followed by
the data I need and then followed by data with more hyphens that I also need.
This formula keeps only the data after the last hyphens.

Here's another example, maybe I didnt explain it well. (the items i want
removed are the abc-123's

abc-123-abc-123-KEEP THIS DATA AND KEEP THIS
DATA-CBA-321-CBA-321-CBA-321-KEEP THIS DATA AS WELL
--
Thanks, Ty


"Mike H" wrote:

Try,
=RIGHT(A1,LEN(A1)-FIND("^^",SUBSTITUTE(A1,"-","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))))

Mike

"Ty" wrote:

I have a a column of data that has 4 seperate hyphens in the text.
EX. abc-123-abc-123-BEGIN NEEDED DATA AND THIS DATA ALSO HAS HYPHENS I WANT
TO KEEP.

How can I remove all the data that preceeds the 4th and final hyphen and
keep the needed data. The # of characters in the preceeding data varies, so
the 4th hyphen ( from the left) is the only consistent measure I have.

--
Thanks, Ty

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 to remove character format under .csv? Eric Excel Discussion (Misc queries) 0 May 14th 08 01:49 PM
Remove ' character from copied excel cell to match data Syndrome Excel Discussion (Misc queries) 9 March 7th 07 05:18 PM
Remove character from imported data jimmxz Excel Discussion (Misc queries) 4 February 19th 07 06:13 PM
How to remove a character from the first index? dex Excel Discussion (Misc queries) 3 January 6th 06 05:33 AM
Remove a particular character using formulas msetyon Excel Discussion (Misc queries) 2 December 1st 05 08:46 PM


All times are GMT +1. The time now is 04:19 PM.

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"