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

Hello,

I am working with a spreadhseet and the data looks normal, however
when you click on the cell the data value contains a leading
apostrophe.

for example the data looks like this:

'4
'8
'10
'8


IS there a quick and easy way to get rid of the leading " ' "? If
so, an advice on how to do this would be greatly appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Apostrophe problem

Does "Find and Replace" not work? I would record a macro doing a manual
Replace and, if it works, you can modify that code to work in your macro.
--
Best wishes,

Jim


"bcap" wrote:

Hello,

I am working with a spreadhseet and the data looks normal, however
when you click on the cell the data value contains a leading
apostrophe.

for example the data looks like this:

'4
'8
'10
'8


IS there a quick and easy way to get rid of the leading " ' "? If
so, an advice on how to do this would be greatly appreciated!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Apostrophe problem

I just discovered my suggestion does not work! However, you can add
something like
Sub testit()
With Cells

Set rng = .Range(.Cells(1, 12), .Cells(1, 12).End(xlDown))
rng.Select
End With

Dim RowNdx As Long
Dim ColNum As Integer
ColNum = Selection(1).Column
For RowNdx = Selection(Selection.Cells.Count).Row To _
Selection(1).Row Step -1
Cells(RowNdx, ColNum) = Mid(Cells(RowNdx, ColNum), 1, 10)
Next RowNdx--


Best wishes,

Jim


"Jim Jackson" wrote:

Does "Find and Replace" not work? I would record a macro doing a manual
Replace and, if it works, you can modify that code to work in your macro.
--
Best wishes,

Jim


"bcap" wrote:

Hello,

I am working with a spreadhseet and the data looks normal, however
when you click on the cell the data value contains a leading
apostrophe.

for example the data looks like this:

'4
'8
'10
'8


IS there a quick and easy way to get rid of the leading " ' "? If
so, an advice on how to do this would be greatly appreciated!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Apostrophe problem

don't know which version of excel you have, but in 2003 i can do it a couple of
ways.

tools/options error checking tab, check number stored as text. then click the
error indicator on the cell and choose convert to number.
or
if the numbers are in a column of contiguous rows, for example, select a like
region of blank cells, right click and choose copy, right click the top of the
range with the numbers stored as text and choose pastespecial. under operations
choose add and the cells should now be numbers.



--


Gary


"bcap" wrote in message
oups.com...
Hello,

I am working with a spreadhseet and the data looks normal, however
when you click on the cell the data value contains a leading
apostrophe.

for example the data looks like this:

'4
'8
'10
'8


IS there a quick and easy way to get rid of the leading " ' "? If
so, an advice on how to do this would be greatly appreciated!



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
The number in this cell is formatted as text or preceded by an apostrophe" problem in Excel [email protected] Excel Discussion (Misc queries) 2 July 13th 06 01:55 PM
The number in this cell is formatted as text or preceded by an apostrophe" problem in Excel [email protected] Excel Programming 2 July 13th 06 01:55 PM
Double Quote Leading to Apostrophe Problem ToferKing Excel Programming 4 January 27th 06 03:41 PM
Add apostrophe Tony Wainwright Excel Worksheet Functions 4 October 29th 04 01:50 PM
Add apostrophe Tony Wainwright[_2_] Excel Programming 4 October 29th 04 01:50 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"