See if this macro does what you want...
Sub CDandVinyl()
Dim NumCol As String, ResultCol As String, LowUp As Variant
NumCol = InputBox("Which column should be searched?")
If NumCol Like "*[!A-Za-z]*" Then
MsgBox "Entry must be the column letter(s)!", vbCritical
Exit Sub
End If
LowUp = InputBox("Enter lower and upper bound separated by a space:")
If Not LowUp Like "* *" Or LowUp Like "*[!0-9 ]*" Or LowUp Like "* * *" Then
MsgBox "You did not type two numbers with a space between them!", vbCritical
Exit Sub
End If
LowUp = Split(Application.Trim(LowUp))
ResultCol = InputBox("Which column should have its cells selected?")
If ResultCol Like "*[!A-Za-z]*" Then
MsgBox "Entry must be the column letter(s)!", vbCritical
Exit Sub
End If
With Range(Cells(1, NumCol), Cells(Rows.Count, NumCol).End(xlUp))
.Value = Evaluate(Replace("IF((@>=" & LowUp(0) & ")*(@<=" & LowUp(1) & "),""=""&@,@)", "@", .Address))
Intersect(.SpecialCells(xlFormulas).EntireRow, Columns(ResultCol)).Select
.Replace "=", "", xlPart, , , , False, False
End With
End Sub
Bookmarks