Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '**************************************************************
- ' Tell the input box what value you want to search for.
- ' --NOTE: MUST BE EXACT VALUE
- '***********************************************************
- Sub highlightSpecificValues()
- Dim rng As Range
- Dim i As Integer
- Dim c As Variant
- c = InputBox("Enter Value To Highlight")
- For Each rng In ActiveSheet.UsedRange
- If rng = c Then
- rng.Style = "Note"
- i = i + 1
- End If
- Next rng
- MsgBox "There are total " & i & " " & c & " in this worksheet."
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement