Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how can i find ' as the first characture in a cell using vba

I am bringing code lines from a module over in to a worksheet and then
searching for a rem " ' " lines and removing them.
BUT once the line is in a cell the ' does not show in any find comand so I
can't find it to remove it. It shows in the formula bar still find don't find
it.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default how can i find ' as the first characture in a cell using vba

Hi,

Right click your sheet tab. view code and paste this in and run it

Sub Kill_The_apostrophe()
For Each c In ActiveSheet.UsedRange
c.Formula = c.Formula
Next
End Sub

Mike

"oletrol" wrote:

I am bringing code lines from a module over in to a worksheet and then
searching for a rem " ' " lines and removing them.
BUT once the line is in a cell the ' does not show in any find comand so I
can't find it to remove it. It shows in the formula bar still find don't find
it.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how can i find ' as the first characture in a cell using vba

Hi Mike and thanks before going any farther.

I have been working on this now for several days and still not right

You know that a ' as the first chr in a code line is like a rem chr.

But when the line of code is copied to cell the first ' like an identifier
to show the cell Text as viewed like('=2*2), it shows as =2*2 and without
the ' it appears as the answer to the formula.

I want to be able to find this first ' and then be able to delete the line
or change the ' to something else So I can then find the other ' later in
the code lines in the cells.

The macro you suggested ealier (below) works like a dream to just remove all
of the first ' but does Not allow me to check if first chr is a ' and do
this or do else

If I change this line to be c.Formula = chr(39) & c.Formula it will place an
* in every cell in the range Weather it has an ' or not because chr(39) &
c.formula is still * plus the existing blank formula.

I know of formula, text, an value and what they represent. But I don't know
if there are any other items things or names I could look for, or possibly
change some option that would allow a ' to show or Be seen by vba to do
something with the ' . Could I possibly turn of calculate and be able to do
what I want. ........

Any help would be deeply appreciated

Thanks Again

Gene

"Mike H" wrote in message
...
Hi,

Right click your sheet tab. view code and paste this in and run it

Sub Kill_The_apostrophe()
For Each c In ActiveSheet.UsedRange
c.Formula = c.Formula
Next
End Sub

Mike

"oletrol" wrote:

I am bringing code lines from a module over in to a worksheet and then
searching for a rem " ' " lines and removing them.
BUT once the line is in a cell the ' does not show in any find comand so
I
can't find it to remove it. It shows in the formula bar still find don't
find
it.



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
Removing an alpha characture from a column of numbers K Drier Excel Worksheet Functions 6 September 2nd 08 09:21 PM
Find and Replace - delete the remainder of the text in the cell after my Find [email protected] Excel Programming 4 August 4th 07 03:39 AM
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON CAPTGNVR Excel Programming 2 July 8th 07 04:18 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
use find twice to find cell on a specific row captbluefin[_6_] Excel Programming 2 November 1st 03 08:22 PM


All times are GMT +1. The time now is 03:28 PM.

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"