Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry Norman, either I didn't see your post or I didn't scroll down far enough.
"Norman Jones" wrote: Hi Katie, Try: '============= Public Sub Tester() Dim Rng As Range Dim rCell As Range Set Rng = ActiveSheet.Range("I3:I10") For Each rCell In Rng.Cells With rCell If Left(.Value, 1) = "," Then .Value = Mid(.Value, 2) End If End With Next rCell End Sub '<<============= --- Regards, Norman "Katie" wrote in message ... Hello all- I know that we spoke before about removing a trailing comma, so i tried to amend that code to remove a leading comma from a range, but it's not working in cells where there's anything after the comma. Could anyone point out what I did wrong with this code? Range("I3:I10").Select For Each cell In Selection If Left(cell.Value, 1) = "," Then cell.Value = Left(cell.Value, Len(cell.Value) - 1) End If Next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to remove first comma in a value | Excel Discussion (Misc queries) | |||
Remove comma tool bar button | Excel Discussion (Misc queries) | |||
Remove Trailing Comma | Excel Programming | |||
need to remove a comma from end of test in cells | Excel Worksheet Functions | |||
How to remove comma and decimals from a value | Excel Discussion (Misc queries) |