My bad! That would be the one thing I did not test. Not very good programming, is
it? (^: Try this
replacement:
Sub ReplaceIt2()
Dim TheColumn As Variant
Dim TheRange As String
Dim TheMin As Variant
Dim TheNewValue As Variant
Dim OriginalRange As String
Dim OriginalCell As String
On Error GoTo Quitter
Application.ScreenUpdating = False
OriginalRange = Selection.Address
OriginalCell = ActiveCell.Address
TheColumn = InputBox("Which column?")
If TheColumn <> "" Then
TheRange = TheColumn & ":" & TheColumn
TheMin = Application.WorksheetFunction. _
Min(Range(TheRange))
TheNewValue = InputBox("Minimum value found was " & _
TheMin & ". Enter value to replace.")
If TheNewValue <> "" Then
Range(TheRange).Select
Selection.Replace What:=TheMin, _
Replacement:=TheNewValue, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
MatchCase:=False, _
SearchFormat:=False, _
ReplaceFormat:=False
Else
MsgBox "No input, operation canceled."
End If
Range(OriginalRange).Select
Range(OriginalCell).Activate
Else
MsgBox "No input, quitting."
End If
Quitter:
Application.ScreenUpdating = True
End Sub