Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Find a backslash at end of a cell

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Find a backslash at end of a cell


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)


"Pirke" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Find a backslash at end of a cell

Bob,

exactly what I was looking for
so thanks a lot!!


Pirke

-----Original Message-----

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)


"Pirke" wrote in

message
...
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




.

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
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
find first empty cell in column and start transpose next row in that cell ali Excel Discussion (Misc queries) 6 July 21st 07 11:55 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
Backslash in Named Range Dorci Excel Discussion (Misc queries) 1 February 15th 07 08:51 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 11:46 AM.

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

About Us

"It's about Microsoft Excel"