Closed Thread
Results 1 to 2 of 2

Help with excell module!!

  1. #1
    Registered User
    Join Date
    07-02-2010
    Location
    Tallahassee, Florida
    MS-Off Ver
    Excel 2003
    Posts
    1

    Help with excell module!!

    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)!!!
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with excell module!!

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to amend your thread title accordingly and add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1