Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
This macro deletes first character of each cell in a range. But if there is
black cell in the begining or in between cells it does not work. Is there any way to overcome this issue. thx. Sub RemoveQuote() On Error GoTo e Dim rng As Range, cell As Object Set rng = Selection For Each cell In rng cell = Right(cell, Len(cell) - 1) Next cell e: End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...l-new/200802/1 |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() Sub RemoveQuote_R1() On Error GoTo e Dim rng As Range, cell As Range Set rng = Selection For Each cell In rng.Cells If cell.HasFormula = False Then If Len(cell.PrefixCharacter) 0 Then cell.Value = cell.Value ElseIf Len(cell.Value) 0 Then cell.Value = Right(cell.Value, Len(cell.Value) - 1) End If End If Next 'cell e: End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "saman110 via OfficeKB.com" wrote in message This macro deletes first character of each cell in a range. But if there is black cell in the begining or in between cells it does not work. Is there any way to overcome this issue. thx. Sub RemoveQuote() On Error GoTo e Dim rng As Range, cell As Object Set rng = Selection For Each cell In rng cell = Right(cell, Len(cell) - 1) Next cell e: End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
Deleting the "'" character in the text formula | Excel Discussion (Misc queries) | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
Deleting the same character automatically in each cell | Excel Worksheet Functions | |||
how prevent formula in cell from deleting when deleting value???? | New Users to Excel |