ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   trim everything from left of first underscore in the text? (https://www.excelbanter.com/excel-worksheet-functions/238229-trim-everything-left-first-underscore-text.html)

Mitchell_Collen via OfficeKB.com

trim everything from left of first underscore in the text?
 
Hi
I am trying to remove all characters to the left of the first occurence of an
underscore but have not found a good solution. do you know how to do this?
thanks in advance - M

I have test in columns like this:

date_123232_5.txt
date234._2343453_356.txt

I want it to look like this:

123232_5.txt
2343453_356.txt

these will later be transformed to hyperlinks to the exact file.

--
Misty :-)

Message posted via http://www.officekb.com


Mike H

trim everything from left of first underscore in the text?
 
Hi,

With your text in a1 try this and drag down

=MID(A1,FIND("_",A1)+1,LEN(A1))

Mike

"Mitchell_Collen via OfficeKB.com" wrote:

Hi
I am trying to remove all characters to the left of the first occurence of an
underscore but have not found a good solution. do you know how to do this?
thanks in advance - M

I have test in columns like this:

date_123232_5.txt
date234._2343453_356.txt

I want it to look like this:

123232_5.txt
2343453_356.txt

these will later be transformed to hyperlinks to the exact file.

--
Misty :-)

Message posted via http://www.officekb.com



Pete_UK

trim everything from left of first underscore in the text?
 
Try this:

=RIGHT(A1,LEN(A1)-SEARCH("_",A1))

Hope this helps.

Pete


On Jul 28, 7:24*pm, "Mitchell_Collen via OfficeKB.com" <u33726@uwe
wrote:
Hi
I am trying to remove all characters to the left of the first occurence of an
underscore but have not found a good solution. do you know how to do this?
thanks in advance - M

I have test in columns like this:

date_123232_5.txt
date234._2343453_356.txt

I want it to look like this:

123232_5.txt
2343453_356.txt

these will later be transformed to hyperlinks to the exact file.

--
*Misty :-)

Message posted viahttp://www.officekb.com



Dave Peterson

trim everything from left of first underscore in the text?
 
You could use a helper cell with a formula:

=MID(A1,SEARCH("_",A1,1)+1,255)

The 255 is just a big number that is large enough to grab all the remaining
text.

"Mitchell_Collen via OfficeKB.com" wrote:

Hi
I am trying to remove all characters to the left of the first occurence of an
underscore but have not found a good solution. do you know how to do this?
thanks in advance - M

I have test in columns like this:

date_123232_5.txt
date234._2343453_356.txt

I want it to look like this:

123232_5.txt
2343453_356.txt

these will later be transformed to hyperlinks to the exact file.

--
Misty :-)

Message posted via http://www.officekb.com


--

Dave Peterson

Mitchell_Collen via OfficeKB.com

trim everything from left of first underscore in the text?
 
Thanks so very much! Your solution did the job!

-M

--
Misty :-)

Message posted via http://www.officekb.com



All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com