View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jetted[_11_] jetted[_11_] is offline
external usenet poster
 
Posts: 1
Default help with this code


Hi VBA

Would this help

Sub keepdash()
Dim Cell As Range
Dim R As Range
Set R = ActiveSheet.UsedRange
'SearchChar = "-"
For Each Cell In R
valeur = Cell.Value
MyPos = InStr(1, valeur, "-")
If MyPos = 0 Then
Cell.Clear
End If
Next
End Su

--
jette
-----------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...fo&userid=1753
View this thread: http://www.excelforum.com/showthread.php?threadid=56331