Results 1 to 5 of 5

VBA Hiding rows

Threaded View

  1. #1
    Registered User
    Join Date
    10-15-2008
    Location
    miami
    Posts
    5

    VBA Hiding rows

    Hey does anyone know how I can make the following code more efficient, it seems to take a really long time to do this, the code hides the row if there is no data in the coloumn, it does it for 3 different sections:

    LastRow = Range("B65000").End(xlUp).Row
    For I = LastRow To 47 Step -1
    If Cells(I, "I") = "" Then
    Rows(I).Hidden = True
    End If
    Next I

    LastRow = Range("B65000").End(xlUp).Row
    For I = LastRow To 815 Step -1
    If WorksheetFunction.IsText(Cells(I, "I")) Then GoTo nexti
    If Abs(Cells(I, "I").Value) < 1 And Abs(Cells(I, "L").Value) < 1 Then
    Rows(I).Hidden = True
    nexti:
    End If
    Next I

    LastRow = Range("A65000").End(xlUp).Row
    For I = LastRow To 1387 Step -1
    If Cells(I, "A") = "" Then
    Rows(I).Hidden = True
    End If
    Next I
    Last edited by VBA Noob; 10-28-2008 at 09:46 AM.

Thread Information

Users Browsing this Thread

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

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