Ahh.. I see..
This is the code you want then, I assume
Sub DepartmentChanger()
Dim userfind As String
Dim userchange As String
Set R = Range("H1:H200") '<--set your range here
userfind = InputBox(Prompt:="Name of prompt here.", Title:="Search for something", Default:="defaultvalue")
If userfind = "defaultvalue" Or userfind = vbNullString Then
MsgBox ("You need to enter something")
Exit Sub
End If
R.Select
Dim foundRange As Range
Set foundRange = Selection.Find(What:=userfind)
If foundRange Is Nothing Then
MsgBox ("No such value exists")
Exit Sub
End If
userchange = InputBox(Prompt:="Found your value!", Title:="What to replace with?", Default:=userfind)
If userchange = "defaultvalue" Or userchange = vbNullString Then
MsgBox ("You need to enter something")
Exit Sub
Else
For Each cell In R
If cell.Value = userfind Then
cell.Value = userchange
End If
Next
End If
End Sub
Bookmarks