Try this macro. It also removes the duplicate Tool Names in Sheet2. I assumed that is what you wanted. If not, just delete the "RemoveDuplicates" line of code.
Sub CreateReport()
Application.ScreenUpdating = False
Dim LastRow As Long
LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Dim ToolName As Range
Dim sDate As String
Dim eDate As String
sDate = InputBox("Please enter the start date in format mm/dd/yyyy", "Enter Start Date", "mm/dd/yyyy")
eDate = InputBox("Please enter the end date in format mm/dd/yyyy", "Enter End Date", "mm/dd/yyyy")
ActiveSheet.ListObjects("Table_Query_from_MS_Access_Database3").Range. _
AutoFilter Field:=3, Criteria1:=">=" & CDate(sDate), Operator:=xlAnd, Criteria2:="<=" & CDate(eDate)
Sheets("Sheet2").Columns("H").ClearContents
Sheets("Sheet2").Range("I4:K" & Range("K" & Rows.Count).End(xlUp).Row).ClearContents
Sheets("Sheet2").Cells(1, 8) = sDate
Sheets("Sheet2").Cells(2, 8) = eDate
Range("B12:B" & LastRow).SpecialCells(xlCellTypeVisible).Copy
Sheets("Sheet2").Cells(4, 8).PasteSpecial xlPasteValues
For Each ToolName In Range("B12:B" & LastRow).SpecialCells(xlCellTypeVisible)
ActiveSheet.ListObjects("Table_Query_from_MS_Access_Database3").Range. _
AutoFilter Field:=2, Criteria1:=ToolName
Sheets("Sheet2").Cells(Sheets("Sheet2").Rows.Count, "I").End(xlUp).Offset(1, 0) _
= WorksheetFunction.Min(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
Sheets("Sheet2").Cells(Sheets("Sheet2").Rows.Count, "J").End(xlUp).Offset(1, 0) _
= WorksheetFunction.Max(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
Sheets("Sheet2").Cells(Sheets("Sheet2").Rows.Count, "K").End(xlUp).Offset(1, 0) _
= WorksheetFunction.Average(Range("D12:D" & LastRow).SpecialCells(xlCellTypeVisible))
Next ToolName
Sheets("Sheet2").Cells.RemoveDuplicates Columns:=Array(8), Header:=xlNo 'removes entire row
Range("A11").AutoFilter
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Bookmarks