I want to accomplish the following
1. ask the user for a time down benchmark and want only rows whose down time (produced in the HoursDown Macro) is over the hours the user enters (This part is working already)
Code:
Sub BenchMark()
Dim rng As Range, cell As Range, del As Range
Dim BenchmarkHours As Double
BenchmarkHours = CDate(Application.InputBox("Please enter down time Benchmark in hours", Type:=1))
If BenchmarkHours = 0 Then Exit Sub
If Not IsNumeric(BenchmarkHours) Then Exit Sub
Application.ScreenUpdating = False
Set rng = Intersect(Range("N:N"), ActiveSheet.UsedRange)
For Each cell In rng
cell.Activate
If (cell.Value) < BenchmarkHours Then
If del Is Nothing Then
Set del = cell
Else: Set del = Union(del, cell)
End If
End If
Next cell
On Error Resume Next
del.EntireRow.Delete
Application.ScreenUpdating = True
End Sub
2. Then if a device ID (column c) down time is over that benchmark requested then I want to show all rows that particular deviceID may have listed regardless if the the Device ID's downtime is over the benchmark or not (have no clue how to do this)!!!
Bookmarks