+ Reply to Thread
Results 1 to 6 of 6

Constant Row Hiding Macro

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Providence
    MS-Off Ver
    2013
    Posts
    32

    Constant Row Hiding Macro

    Hey guys,

    I need a macro that hides rows in a worksheet when..

    Indirect(C&Row())=""
    AKA When that rows corresponding cell in Column C is equal to ""

    Also, does this macro need to be enabled by a button? or is it possible to have it running on a continued basis (each time the sheet is recalculated hiding and unhiding blank and unblank columns.

    Thanks so much in advance.

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Constant Row Hiding Macro

    I just wrote something similar:

    Please Login or Register  to view this content.
    Unfortunately this kind of macro requires a button press, I do not know, how to make them run indefintely on opening the file.

  3. #3
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Constant Row Hiding Macro

    Found a way to run it without a button press, it runs every time you make changes.
    I did not fully understand the thing about the targer cell, in this case it is C2.

    Please Login or Register  to view this content.
    Last edited by bmouse; 08-03-2015 at 09:52 AM.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Constant Row Hiding Macro

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-29-2015
    Location
    Providence
    MS-Off Ver
    2013
    Posts
    32

    Re: Constant Row Hiding Macro

    What I meant is that it decided to hide or not hide the row based on if C in that row is blank.

    Example: In order to decide if I should hide row 3 I would Check if c3 is blank, in order to decide row 4 I would check if c4 is blank, ect....

  6. #6
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Constant Row Hiding Macro

    StartNumber is the number of your first row.
    EndNumber is the number of your rows in total.
    Be careful though, this macro runs every time you change something, and if C is empty, it will hide the rows automatically. I set EndNumber to 10, so that it wouldn't look past row 10.

    Please Login or Register  to view this content.

+ 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. Macro to copy data at constant interval
    By dammyfad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2014, 03:54 AM
  2. Compile error (Constant expression required) when using macro twice
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2014, 10:35 AM
  3. [SOLVED] need to stop constant scree refresh in large looped macro
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2014, 01:13 AM
  4. Macro to Scan table array for value from Cell, Value is not constant
    By levl91 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2013, 08:53 AM
  5. Constant Macro Ignoring a Variable
    By Desk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2011, 02:35 PM
  6. Macro to add constant value
    By TimmerSuds in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2010, 03:55 PM
  7. macro code for constant copy but variable paste cell
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2009, 03:32 AM

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