Your request is actually very simple. If I may, I suggest you simplify a little:
For example, put only one button, which captures the value of the cell selected, go to the results sheet, and filter the array. Add 1 button on this page to cancel the filter and go to page summary.
I made a macro to filter your table, and to create buttons, + 1 cancel button. Select the macro with your mouse, copy them, open your file, do Alt + F11, look left column: you see the name of your file, the name of the leaves, and "ThisWorkbook". dbl-click this entry and ctrl + V on the page. Save the file. ds-click the macro Buttons_Of_FILTER, hit F5, you have your buttons, click in the cell of choice sheet "Summary", click on the button, you have your result.
Code:
Sub FILTER ()
'Click in the cell of choice sheet "Summary"
Sun Mycell As Range
Sheets ("Summary"). Select
Set Mycell = ActiveCell.Offset (0, 1)
Mycell.Value = "" 'supp value next to the Selection
Choice = ActiveCell.Value
Column = 4 '
'Column = ActiveCell.Column
Sheets ("Result"). Select
Range ("A1"). CurrentRegion.Select
Selection.AutoFilter
Selection.AutoFilter Field: = Column, Criteria1: = Selection, Operator: = xlAnd
'''''''''''''''''''''''''''''''
nbrangs Selection.SpecialCells = (xlCellTypeVisible). Rows.Count 'Number of rows selected
Mycell.Value = nbrangs 'record this nbr collar B synthesis side of the cell selected.
''''''''''''''''''''''''''' if you want to remove the filter and go directly to the fl synthesis, removes the quotes at the beginning of lines selected.
'Selection.AutoFilter
'Sheets ( "Summary"). Select
End Sub
Sub Buttons_Of_FILTER ()
'I made 2 macros installing these buttons on your sheets:
Sheets ( "Summary"). Select
Rows ( "1:1"). RowHeight = 25
'Application.CommandBars ( "Forms"). Visible = True
ActiveSheet.Buttons.Add (309.75, 6 215.25, 19). Select
Selection.OnAction = "ThisWorkbook.FILTER"
Selection.Characters.Text = "FILTER"
With Selection.Characters (Start: = 1, Length: = 8). Font
. FontStyle = "Bold"
. Size = 14
End With
Range ( "D1"). Select
Sheets ( "Result"). Select
Rows ( "1:1"). RowHeight = 25
ActiveSheet.Buttons.Add (309.75, 6 215.25, 19). Select
Selection.OnAction = "ThisWorkbook.NO_Filter"
Selection.Characters.Text = "Remove Filter"
With Selection.Characters (Start: = 1, Length: = 15). Font
. FontStyle = "Bold"
. Size = 14
End With
Range ( "D1"). Select
End Sub
Sub NO_Filter ()
Sheets ( "Result"). Select
Range ( "A1"). Select
Selection.AutoFilter Field: = 1, Criteria1 :="", Operator: = xlAnd
Selection.AutoFilter
Sheets ( "Summary"). Select
End Sub
Bookmarks