View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default How to search a cell for last instance of repeating character anddelete to end of data

Sub Macro1()
Dim c As Range
Set c = Range("A1")
For iCt = Len(c) To 1 Step -1
If Mid(c, iCt, 1) = "-" Then
c = Left(c, iCt - 1)
Exit For
End If
Next iCt
End Sub

Hth,
Merjet