Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find & Replace: find part cell, replace whole cell | Excel Worksheet Functions | |||
find first empty cell in column and start transpose next row in that cell | Excel Discussion (Misc queries) | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Backslash in Named Range | Excel Discussion (Misc queries) | |||
use find twice to find cell on a specific row | Excel Programming |