Results 1 to 5 of 5

Hiding rows based on a certain cell's value which is a formula

Threaded View

  1. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Hiding rows based on a certain cell's value which is a formula

    Try this instead:

    Private Sub Worksheet_Calculate() 
    
     Application.EnableEvents = False
     
     Rows.Hidden = False
    
     If Worksheets("Template Sheet").Cells(21, 2).value = "" Then _
     Rows("1:34").Hidden = True
     
     If Worksheets("Template Sheet").Cells(55, 2).value = "" Then _
     Rows("35:68").Hidden = True
     
     If Worksheets("Template Sheet").Cells(89, 2).value = "" Then _
     Rows("69:102").Hidden = True
     
     If Worksheets("Template Sheet").Cells(123, 2).value = "" Then _
     Rows("103:136").Hidden = True
     
     If Worksheets("Template Sheet").Cells(157, 2).value = "" Then _
     Rows("137:170").Hidden = True
     
     Application.EnableEvents = True
    
     End Sub
    Last edited by xladept; 07-30-2015 at 07:11 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hiding Rows based on a cell Value that is a result of a formula
    By erydius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2014, 08:30 PM
  2. [SOLVED] (SOLVED) Hiding rows based on a cell value that comes from a formula
    By Dbouwheer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-26-2014, 08:15 AM
  3. [SOLVED] Hiding rows based on cell value.
    By Metalgijs in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-12-2013, 03:08 AM
  4. Hiding rows in one tab based on cell value in another
    By hoffmt28 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2013, 09:27 AM
  5. Hiding Rows based on Formula result
    By Viscount_Grey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2011, 08:59 AM
  6. Hiding rows based on value in another cell
    By sahar in forum Excel General
    Replies: 0
    Last Post: 10-12-2011, 10:27 AM
  7. Hiding Rows Based based upon cell value being blank
    By leelee23 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2007, 04:48 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