delete characters at the end

S

Stan

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,
 
J

Jacob Skaria

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
 
K

Ken Wright

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........................
 
R

Rick Rothstein

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.
 
R

Ron Rosenfeld

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
 
Top