Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Remove ' from text columns

There has to be a way to do this but I am missing it somewhere. I have
exported some info from Access and now every cell contains a ' at the
begining of the cell. I know how to remove that from cells with numbers in
it but can't figure out the text cells. Any help?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200809/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 154
Default Remove ' from text columns

JackBlack,

After a quick google search I have found the following VBA code, if you wish
to use it.

Sub DeathToApostrophe()
Dim s As Range, temp As String
If MsgBox("Are you sure you want to remove all leading apostrophes from
the entire sheet?", _
vbOKCancel + vbQuestion, "Remove Apostrophes") = vbCancel Then Exit Sub
Application.ScreenUpdating = False
For Each s In ActiveSheet.UsedRange
If s.HasFormula = False Then
'Gets text and rewrites to same cell without the apostrophe.
s.Value = s.Text
End If
Next s
Application.ScreenUpdating = True
End Sub

Source:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=109

--
--Thomas [PBD]
Working hard to make working easy.


"jackBlack via OfficeKB.com" wrote:

There has to be a way to do this but I am missing it somewhere. I have
exported some info from Access and now every cell contains a ' at the
begining of the cell. I know how to remove that from cells with numbers in
it but can't figure out the text cells. Any help?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200809/1


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Remove ' from text columns

Hi,

This will remove the first character
=MID(A1,2,LEN(A1))

Drag down

If this leaves you with leading spaces try this
=TRIM(MID(A1,2,LEN(A1)))

If you really mean a ' at the start of each cell try this
=MID(A1,FIND("'",A1,1)+1,LEN(A1))


Mike

Mike

"jackBlack via OfficeKB.com" wrote:

There has to be a way to do this but I am missing it somewhere. I have
exported some info from Access and now every cell contains a ' at the
begining of the cell. I know how to remove that from cells with numbers in
it but can't figure out the text cells. Any help?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200809/1


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
open text file in Excel and remove columns SLP Excel Discussion (Misc queries) 5 August 14th 08 04:37 PM
how do I remove the automatic break lines in text to columns? whoff Excel Discussion (Misc queries) 1 April 24th 08 02:43 AM
Text to Columns - Way to remove all column breaks at one time? Cathy Excel Discussion (Misc queries) 1 November 20th 07 12:08 AM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM


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