How to find out a string starts with apostrophe?

E

Eric

I have 500 rows data all located at col "A", some of text
beginning with an apostrophe and some don't.

I need a solution to either remove all extra apostrophe
from the beginning of text, or add an apostrophe to those
texts without one.

Thanks in advance,
 
F

Frank Kabel

Hi
try the following (works on your current selection)
sub remove_it()
dim rng as range
set rng = selection
rng.value=rng.value
end sub
 
C

Chip Pearson

Eric,

Try something like

Dim Rng As Range
For Each Rng In
Range("A1:A500").SpecialCells(xlCellTypeConstants)
Rng.Value = Rng.Value
Next Rng

This will remove all the leading ' characters.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top