Find a backslash at end of a cell

  • Thread starter Thread starter Pirke
  • Start date Start date
P

Pirke

Hi all,

maybe someone can help me
I want to look trough a large excel file, and replace
every backslash that's the last character in a cell.
All other backslashes should not be replaced!

I'm trying to write a macro for this, but I don't know how
to make sure it's replaced only when it's the last
charcter in a cell.


How can I do this?

I'm working with Excel XP.


thanks, Pirke
 
For Each Cell In ActiveSheet.UsedRange
If Right(cell.Value,1) = "\" Then
cell.Value = left(cell.Value,Len(cell.Value)-1)
End If
Next Cell



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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