Results 1 to 4 of 4

Need to tweak code...Hide Rows Based on Cell Value

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-18-2009
    Location
    Winnipeg
    MS-Off Ver
    Excel 2003
    Posts
    203

    Need to tweak code...Hide Rows Based on Cell Value

    I have the code below hiding columns based on the value in the respective cells.

    Now I need to adjust this so it will also hide rows A9:A16 based on their cell values. They will either be blank or will say "HIDE" if that row needs to be hidden.

    Private Sub Worksheet_Calculate()
    Dim rCell As Range
    For Each rCell In Range("D1:L1")
    rCell.EntireColumn.Hidden = (rCell.Value = "HIDE")
    Next rCell
    End Sub
    Last edited by kmlloyd; 07-21-2015 at 11:06 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Hide rows based on cell value - VBA code
    By phbryan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2015, 12:38 PM
  2. Looking for a VBA code to hide rows based on a single cell value
    By Dial1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2013, 07:04 PM
  3. Help: Code to hide multiple rows based on different cell values
    By swamy156 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2012, 04:35 AM
  4. VBA code to hide/show rows based on value in each row
    By KEM4321 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2012, 01:19 PM
  5. Code to show/hide rows based on Y
    By Justinmih in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2011, 06:12 PM
  6. Modify code to hide rows based on the contents in a cell.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2009, 09:07 PM

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