+ Reply to Thread
Results 1 to 6 of 6

Resolved >>> FIltering Non blank Rows

Hybrid View

  1. #1
    Registered User
    Join Date
    10-24-2007
    Posts
    6

    Resolved >>> FIltering Non blank Rows

    Im new at this so if you can help please give step by step instuctions.
    I have a very long excell sheet and I want to be able to have two buttons off to the side that allows me to filter and unfilter my page. What I want to accomplish is if the cell in column "A" is not populated then I do not want to see that entire row when I filter. any help would be greatly appreciated it would make me look like the office genius!!!!!!!!!
    By the way I have never created a macro before and I believe that is what I need to do.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Maybe this link will help. Look at "Blank Cells in a Column"

    http://www.contextures.com/xlautofil...html#FilterCol

    If you need code then try

    Columns(1).AutoFilter Field:=1, Criteria1:="<>"
    Links should show you what to do

    Where to place code

    How to run code

    Add buttons

    or

    Form Buttons

    VBA Noob
    Last edited by VBA Noob; 10-24-2007 at 04:09 PM.
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Attached is an example

    VBA Noob
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-24-2007
    Posts
    6

    thanks noob

    thanks for the sample it used your sheet as mine and it works fantastic. THANKS A MILLION!

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad it helped

    Thx for the feedback

    VBA Noob

  6. #6
    Registered User
    Join Date
    12-19-2003
    Location
    Eslöv, Sweden
    Posts
    4

    Re: Resolved >>> FIltering Non blank Rows

    This will do what you want. Just edit the parameters with ?
    /Tony

    Sub Filter_On()
    Dim rnCell, rnOmrade As Range

    Set rnOmrade = Worksheets("Sheet?").Range(Cells(StartRow?, StartColumn?), Cells(LastRow?, LastColumn?).End(xlUp))

    For Each rnCell In rnOmrade
    If rnCell.Value = "" Then
    rnCell.Rows("1:1").EntireRow.Hidden = True
    End If
    Next rnCell

    End Sub
    Best Regards
    Tony

+ Reply to Thread

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