You'll probably want to play with this button:
Sub Macro20()
'
' Macro20 Macro
'
'
ActiveSheet.Buttons.Add(26.25, 5.25, 72, 72).Select
Selection.OnAction = "HQH"
End Sub
And, I had something grander in mind but this seems to work!
Sub HQH(): Dim S As String, U As Range, n As Long, r As Long, Z
Rows.Hidden = False: Cells(1, 2).ClearComments
'Enter numbers with a comma between each one
S = InputBox("What quantities would you like to be Hidden?")
If S = "" Then Exit Sub
Z = Split(S, ",")
For r = 1 To Rows.Find("*", , , , xlByRows, xlPrevious).Row
For n = LBound(Z) To UBound(Z)
If Cells(r, 1) = Val(Z(n)) Then
If U Is Nothing Then Set U = Cells(r, 1) Else Set U = Union(U, Cells(r, 1))
Exit For
End If
Next n
Next r
If Not U Is Nothing Then U.EntireRow.Hidden = True
S = "Rows with quantities " & S & " are now Hidden"
Cells(1, 2).AddComment (S)
End Sub
Bookmarks