Results 1 to 4 of 4

Thread: Auto hide rows and column in Excel 2007

  1. #1
    Join Date
    Dec 2008
    Posts
    120

    Auto hide rows and column in Excel 2007

    Hi,
    I have an Excel sheets which has a list of services table where certain row has 0 value i want to print those sheets but i want to auto hide those 0 value row and column from that sheet automatically.

    Thank you

  2. #2
    Join Date
    May 2008
    Posts
    4,574

    Re: Auto hide rows and column in Excel 2007

    Code:
    Sub AutoFilter()
        Range("A1:Z300").AutoFilter
        Selection.AutoFilter Field:=10, Criteria1:="<>"
    End Sub
    Sub Macro3()
    
    
    Sub TurnFilterOff()
    'removes AutoFilter if one exists
      Worksheets("Sheet1").AutoFilterMode = False
    End Sub
    this may work but if you just want to see non blank cells, then you could use this code

  3. #3
    Join Date
    May 2008
    Posts
    4,834

    Re: Auto hide rows and column in Excel 2007

    Try this

    • Open an Excel workbook
    • Select Tools/Macro/Visual Basic Editor
    • In the VBE window, select Tools/Project Explorer
    • Select the worksheet module for the linked sheet
    • Copy and paste the code into this Module
    • Now select File/Close and Return To Microsoft Excel
    • Save your changes...


    Now download this attachment to see the code

    HideBlankLinkedRows.zip 8.94KB

  4. #4
    raptor1234 Guest

    Re: Auto hide rows and column in Excel 2007

    you can just use the filers from the menu and do the same thing without this code..

Similar Threads

  1. How to auto insert rows in excel
    By Yakov in forum Windows Software
    Replies: 7
    Last Post: 19-04-2012, 05:55 PM
  2. Is it possible to have rows above 65,000 in Excel 2007
    By Nyota in forum MS Office Support
    Replies: 2
    Last Post: 21-02-2012, 05:07 PM
  3. Replies: 2
    Last Post: 17-02-2012, 07:05 PM
  4. Replies: 2
    Last Post: 17-01-2012, 05:31 PM
  5. VBA to hide the rows in Microsoft Excel
    By Lanka Boy in forum MS Office Support
    Replies: 1
    Last Post: 14-01-2012, 02:12 PM

Posting Permissions

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