Sorry for the delay.
Here is a macro that could help you. I also attached a workbook with the macro in it.
I commented the macro so you could see what the code stands for.
Sub Button5_Click()
Dim C_ell As Range
Dim sh As Worksheet
Application.ScreenUpdating = False
Worksheets ("Sheet2")
'
'Select any cell in the table for the AutoFilter to determine the proper range to filter
Range("C10").Select
'Check if FILTER mode already on
If Not ActiveSheet.AutoFilterMode Then
'If not, then activate AutoFilter
Selection.AutoFilter
Else
'If already activated, then ShowAllData (Kind of reset)
ActiveSheet.ShowAllData
End If
'
'Create 3 filters
'They self align to the proper columns based on value in cells A5 in Sheet1
ActiveSheet.Range("$C$8:$AD$" & Cells(Rows.Count, 1).End(xlUp).Row).AutoFilter Field:=-1 + (Sheets("Sheet1").Range("A5") / 10 * 3), Criteria1:=">" & Sheets("Sheet1").Range("B5"), _
Operator:=xlAnd
ActiveSheet.Range("$C$8:$AD$" & Cells(Rows.Count, 1).End(xlUp).Row).AutoFilter Field:=(Sheets("Sheet1").Range("A5") / 10 * 3), Criteria1:=">" & Sheets("Sheet1").Range("C5"), _
Operator:=xlAnd
ActiveSheet.Range("$C$8:$AD$" & Cells(Rows.Count, 1).End(xlUp).Row).AutoFilter Field:=1 + (Sheets("Sheet1").Range("A5") / 10 * 3), Criteria1:=">" & Sheets("Sheet1").Range("D5"), _
Operator:=xlAnd
'
'Copy first filtered value in Sheet1 cell G5
Sheets("Sheet1").Range("G5") = ActiveSheet.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Cells(1, 1)
'Turn Autofilter off
Selection.AutoFilter
'Get back to Sheet1 to see the result
Sheets("Sheet1").Select
Range("G5").Select
'
Application.ScreenUpdating = True
End Sub
Hope this helps
Bookmarks