Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Find/Replace Unshown Apostrophe

I can't find a similar question to this... I am trying to find a way to take
a cell that shows 0 in the cell but in the formula bar, it shows as '0. I
want to be able to strip out the apostrophe so that Excel will recognize the
0 as a number.

I tried the code below but to no avail.

Sub Find_Replace()
Range("AO6:AQ500").Select
Selection.Replace What:=Chr(39), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub

Is it possible to do what I want to do?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Find/Replace Unshown Apostrophe

Select the cells in question and run:

Sub quote_killer()
For Each r In Selection
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub
--
Gary''s Student
gsnu200709


"ajvasel" wrote:

I can't find a similar question to this... I am trying to find a way to take
a cell that shows 0 in the cell but in the formula bar, it shows as '0. I
want to be able to strip out the apostrophe so that Excel will recognize the
0 as a number.

I tried the code below but to no avail.

Sub Find_Replace()
Range("AO6:AQ500").Select
Selection.Replace What:=Chr(39), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub

Is it possible to do what I want to do?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Find/Replace Unshown Apostrophe

Thanks, Gary's Student - that helped me achieve the desired effect.
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
Find and Replace - Replace with Blank Space Studebaker Excel Discussion (Misc queries) 4 April 3rd 23 10:55 AM
reveal unshown data in cell jessi Excel Discussion (Misc queries) 9 August 17th 07 10:56 PM
FIND and REPLACE ' apostrophe James T Excel Discussion (Misc queries) 3 June 9th 06 06:55 AM
find and replace - replace data in rows to separated by commas msdker Excel Worksheet Functions 1 April 15th 06 01:00 AM
Using Find and Replace to replace " in a macro snail30152 Excel Programming 1 April 13th 06 11:58 PM


All times are GMT +1. The time now is 03:56 AM.

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"