+ Reply to Thread
Results 1 to 7 of 7

MACRO to Detect Hidden Rows

  1. #1
    Registered User
    Join Date
    06-18-2019
    Location
    Atlanta
    MS-Off Ver
    2010
    Posts
    3

    MACRO to Detect Hidden Rows

    Hello All,

    I would like to create a MACRO that detects all hidden rows and stores the row numbers in a global variable. After this, a person will filter the sheet. After the filter, I would like to create another MACRO which re-hides all the previously hidden rows. I am having a problem even getting started with this MACRO. Any help is appreciated.

    If you guys have any questions about the MACRO, please ask in the comment section.

    Thank you a ton,

    Andrej Sulek
    Last edited by Andrej Sulek; 06-18-2019 at 01:17 PM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: MACRO to Detect Hidden Rows

    Are you talking really talking about HIDING / unhiding rows, or are you trying to restore a previous FILTER?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    06-18-2019
    Location
    Atlanta
    MS-Off Ver
    2010
    Posts
    3

    Re: MACRO to Detect Hidden Rows

    I am talking about hiding and unhiding the rows. The filter automatically unhides the rows that the filter condition applies to. I am looking to hide all the rows that were hidden before the filter.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: MACRO to Detect Hidden Rows

    Something like:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: MACRO to Detect Hidden Rows

    Perhaps using a range would work as well?

    Please Login or Register  to view this content.
    Changing columns(1) to a reduced range (say A1:A & last row) would be a huge performance improvement, but wasn't sure of your requirements.
    Last edited by Arkadi; 06-18-2019 at 11:09 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  6. #6
    Registered User
    Join Date
    06-18-2019
    Location
    Atlanta
    MS-Off Ver
    2010
    Posts
    3

    Re: MACRO to Detect Hidden Rows

    That worked perfectly. Thank you <3

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: MACRO to Detect Hidden Rows

    Glad we could help Andrej
    Please remember to mark the thread as solved when you have a chance?

+ 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] Possible to have a cell detect if there are hidden rows and yield a YES/NO result?
    By melegaunt in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-05-2015, 05:00 PM
  2. Macro to detect last columns and last rows
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 03:33 PM
  3. How can I build a macro to auto detect number of rows?
    By Spawn10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2013, 07:33 AM
  4. Macro to remove the blank rows and detect header
    By coolanks1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-20-2009, 03:40 AM
  5. Replies: 3
    Last Post: 08-08-2006, 08:10 AM
  6. [SOLVED] How to detect if a workbook is hidden through VBA
    By Aaron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2005, 03:05 PM
  7. How to detect if sheet is hidden?
    By hstijnen in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2005, 11:06 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