Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 150
Default 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,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default 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,


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default 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,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 634
Default 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,



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default 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,




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default 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
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
delete non numberic characters David T Excel Discussion (Misc queries) 6 September 7th 06 04:13 AM
Delete first two characters in a cell... ChuckF Excel Worksheet Functions 6 September 5th 06 08:46 PM
Delete first few cell characters mohd21uk via OfficeKB.com Excel Discussion (Misc queries) 4 June 7th 06 12:32 PM
delete all the cell that contains more than 25 characters [email protected] Excel Discussion (Misc queries) 2 June 7th 06 12:06 PM
How to delete first two characters in a Column NWILL Setting up and Configuration of Excel 1 October 13th 05 09:31 PM


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