I have a sub that deletes a . if it is found in a cell for a range of cells. It runs fine if there is a . present but if there isn't it stops my sub. Is there anyway i can skip over the cell if it doesn't contain a . ?
My code is
Sub CalcEffy()
Dim i As Long
i = 57
With Sheets("Design Database")
Do While i <= .Rows.Count
If .Cells(i, 2) <> "" Then
Sheets("Design Database").Range("B" & i).Select
Selection.Find(What:=".", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.Replace What:=".", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Else
Exit Do
End If
i = i + 1
Loop
End With
End Sub
Bookmarks