+ Reply to Thread
Results 1 to 6 of 6

Macro to auto hide rows in a specific range

  1. #1
    Registered User
    Join Date
    10-31-2011
    Location
    Singapore
    MS-Off Ver
    Microsoft 365 (Windows 10)
    Posts
    62

    Macro to auto hide rows in a specific range

    HI, i have the following macro to autohide some rows with no data, however its remove rows starting from column A.

    Please Login or Register  to view this content.
    How do i fix this to only hide the rows in the range (H4:V50)?

    Thanks!!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Macro to auto hide rows in a specific range

    Change the <1 to =""
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-31-2011
    Location
    Singapore
    MS-Off Ver
    Microsoft 365 (Windows 10)
    Posts
    62

    Re: Macro to auto hide rows in a specific range

    Hi Alan, its not hiding anything now....

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Macro to auto hide rows in a specific range

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Registered User
    Join Date
    10-31-2011
    Location
    Singapore
    MS-Off Ver
    Microsoft 365 (Windows 10)
    Posts
    62

    Re: Macro to auto hide rows in a specific range

    Hi, i think i've got it... the rows are now auto hiding nicely, but how do i set the above macro to run when i open the workbook? Currently i am assigning the macro to a shape and manually clicking the shape to run it. I would like it to run ever time i open the Excel workbook so the rows automatically hide/unhide every morning when i launch the spreadsheet.

    thanks!

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Macro to auto hide rows in a specific range

    Copy the code and place it in the ThisWorksheet as a Worksheet Open event. Make sure to remove the Sub Hide_Rows title after pasting into the new event as Excel. Delete the module that holds this macro after testing the Worksheet_Open Event.

    A tutorial in case this is not clear.

    http://www.ozgrid.com/VBA/auto-run-macros.htm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  2. Replies: 4
    Last Post: 09-24-2013, 05:44 AM
  3. Auto Hide And Unhide Row Based On Empty Cell In Specific Range
    By jackgan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 09:18 AM
  4. [SOLVED] Macro To Auto-Hide Rows
    By TheRustyScupper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2013, 02:01 AM
  5. Need Macro to Auto hide rows
    By cmwood in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-24-2013, 10:47 AM

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