![]() |
delete characters at the end
I have about 500 cells that end with /2, /3, /4, etc.
is there a way to get rid of any character that follows "/", including "/"? thanks, |
delete characters at the end
Sub striptext()
Columns("g").replace "/?", "" End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Stan" wrote in message ... I have about 500 cells that end with /2, /3, /4, etc. is there a way to get rid of any character that follows "/", including "/"? thanks, |
delete characters at the end
If you have the data in colA
In CellB1 =LEFT(A1,FIND("/",A1)-1) and copy down as required.. If this post helps click Yes --------------- Jacob Skaria "Stan" wrote: I have about 500 cells that end with /2, /3, /4, etc. is there a way to get rid of any character that follows "/", including "/"? thanks, |
delete characters at the end
Assuming that is the only part of the cells contents that contain a /, then
you can just select all the data and do Data / Text To Columns / Delimited Width, then choose 'Other' and put / in as the delimiter and simply choose not to import the second column when given the option. Regards Ken........................ "Stan" wrote in message ... I have about 500 cells that end with /2, /3, /4, etc. is there a way to get rid of any character that follows "/", including "/"? thanks, |
delete characters at the end
Select the cells (you can select more than them, but those cells should not
have a slash in them if you do), click Edit/Replace from Excel's menu bar, put /* (that is a slash asterisk) in the "Find what" field and leave the "Replace with" field empty, then click the "Replace All" button. IF this doesn't work, then it probably means you have the "Match entire cell contents" box checked on the additional options section of the dialog (viewable by pressing the "Options" button); if so, uncheck it and click the "Replace All" button again. -- Rick (MVP - Excel) "Stan" wrote in message ... I have about 500 cells that end with /2, /3, /4, etc. is there a way to get rid of any character that follows "/", including "/"? thanks, |
delete characters at the end
On Thu, 9 Jul 2009 10:41:01 -0700, Stan wrote:
I have about 500 cells that end with /2, /3, /4, etc. is there a way to get rid of any character that follows "/", including "/"? thanks, If there could be only one "/" in the string, then: =LEFT(A1,FIND("/",A1)-1) If there could be MORE than one "/" in the string, then: =LEFT(A1,-1+FIND(CHAR(1),SUBSTITUTE(A1,"/",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))) --ron |
All times are GMT +1. The time now is 07:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com