Hi could would anyone have a macro that would bring up and search box
to search for a word in column "s" of a sheet called "data" ?
I have the following code below if someone could adjust it to just search the 1 sheet and 1 column
Thanks
to search for a word in column "s" of a sheet called "data" ?
I have the following code below if someone could adjust it to just search the 1 sheet and 1 column
Thanks
VBA Code:
Sub word()
Dim srchVal As Variant
Dim ws As Worksheet
' Specify what to search for (hard-code or range reference)
srchVal = InputBox("What value do you want to look for?")
' Loop through all sheets and check cell c1 for search value
For Each ws In Worksheets
If Format(ws.Range("c1")) = Format(srchVal) Then
ws.Activate
MsgBox srchVal & " found on sheet " & ws.Name
End If
Next ws
End Sub