How do I remove the ' from the begining of value in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column containing dates but some begin with a ' which I need to
remove programatically.... any ideas. I already have the for next loop set up
but unable to find the correct method for detecting the ' and also removing
it to leave the date entry intact.
 
Sub tic_killer()
Set rr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants, xlTextValues)
For Each r In rr
If r.PrefixCharacter = "'" Then
r.Value = r.Value
End If
Next
End Sub
 
Hi Roger, Many thanks I did try this but got the following error 'Type
Mismatch', not sure but can you multiply a date? anyway I do appreciate your
response...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top