parscon
05-10-2012, 07:33 AM
i have a data that all the cell have - (dash with space that mean after dash have a 1 space)
i have this code for delete this dash but it is not work .and this dash will be in right with 1 space .
Please help me
Sub Trim()
For Each c In Worksheets("Sheet1").Range("A1:A3").Cells
If Right(c.Value, 1) = "- " Then
c.Value = Mid(c.Value, 1, Len(c) - 1)
End If
Next
End Sub
example : 2322424-
i have this code for delete this dash but it is not work .and this dash will be in right with 1 space .
Please help me
Sub Trim()
For Each c In Worksheets("Sheet1").Range("A1:A3").Cells
If Right(c.Value, 1) = "- " Then
c.Value = Mid(c.Value, 1, Len(c) - 1)
End If
Next
End Sub
example : 2322424-