+ Reply to Thread
Results 1 to 5 of 5

Hide rows in a named range based on cell value

  1. #1
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Hide rows in a named range based on cell value

    Hello,

    I am using the following code to hide rows. In the code, I am giving BeginRow = 12 and EndRow = 85 Which I would like to name it as Range 1 and
    BeginRow = 87 & EndRow = 130 as Range 2. Using the named range "range 1" and "range 2", I would like to achieve the task ie., if cells in column 28 are zero, then hide the entire row.

    Help plz.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hide rows in a named range based on cell value

    Your code doesn't work? It should be doing as you asked.

    Are there formulas in the cells in row 28? Are you looking for a value of 0 or an empty cell?

  3. #3
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Hide rows in a named range based on cell value

    My code works. I want to modify the code for named range for future use(in case if any rows are added)

    There are formulas in column 28. Not empty cell but I am looking for value "0".

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hide rows in a named range based on cell value

    Note: Range 1 and Range 2 are not valid names for named ranges

    Please Login or Register  to view this content.
    Last edited by stnkynts; 03-16-2015 at 07:40 PM.

  5. #5
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2021
    Posts
    347

    Re: Hide rows in a named range based on cell value

    That worked for me.

    Thanks stnkynts.

+ 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] Hide a range of rows based on cell values.
    By klunker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2014, 10:26 AM
  2. [SOLVED] Show/hide rows based on drop down cell using named ranges
    By Stu091074 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 11:00 AM
  3. Replies: 1
    Last Post: 11-28-2013, 05:38 AM
  4. [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
  5. [SOLVED] How to hide rows based on cell value, row range is dynamic.
    By csh8428 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2012, 02:05 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