+ Reply to Thread
Results 1 to 4 of 4

Show/Hide Rows Columns based on value in named range

  1. #1
    Forum Contributor
    Join Date
    05-20-2008
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    174

    Show/Hide Rows Columns based on value in named range

    Hi,

    I have written the following code to try and hide a certain column depending on the value in a named range (single cell).
    It does not seem to hide the column unless I have the named range on the same worksheet and I don't want it to be there, I want it to be on a separate worksheet. I am very new to VBA so this is maybe an impossibility or that I have made some silly rookie error; perhaps you could enlighten me as to which is true?

    Please Login or Register  to view this content.
    Last edited by Andrew-Mark; 01-21-2016 at 07:13 AM.

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

    Re: Show/Hide Rows Columns based on value in named range

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Show/Hide Rows Columns based on value in named range

    Just add a sheet criteria before specifying the columns like this..

    Please Login or Register  to view this content.
    Replace SheetName by the name of target sheet (keep the double inverted commas)

    Hope that works!!
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  4. #4
    Forum Contributor
    Join Date
    05-20-2008
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    174

    Re: Show/Hide Rows Columns based on value in named range

    Thanks to you both for both the solution and not saying "Rookie error"

+ 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] Auto Hide Rows based on Cell Value in Named Range
    By PaulHatton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-03-2015, 06:05 PM
  2. [SOLVED] Hide rows in a named range based on cell value
    By Ravana in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2015, 01:54 AM
  3. [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
  4. Replies: 1
    Last Post: 11-28-2013, 05:38 AM
  5. Replies: 4
    Last Post: 05-08-2012, 10:28 AM
  6. Conditionally hide rows in a named range
    By JChandler22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2011, 10:02 AM
  7. hide data based on named range from another tab
    By fmluder93 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2011, 01:16 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