+ Reply to Thread
Results 1 to 3 of 3

Hide/Unhide Rows based on Cell Content (Row on sheet 1 has yes/same row on sheet2 visble)

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Hide/Unhide Rows based on Cell Content (Row on sheet 1 has yes/same row on sheet2 visble)

    Hi,
    Sheet 1, starting with Row 14 thru Row 44, if A = yes then the same row on sheet 2 should be visible
    Right now I do this through the worksheet change event and I gave each cell a name. I go through a very long process and I check the contents of each cell on change
    If Sheet1.A14 = "yes", sheet2 row 14 = visible otherwise not visible (so there are 29 separate if statements). (I gave the rows on sheet 2 names as well that are similar to the names in sheet 1)

    Is there a simpler/better way to write this without going through each named cell? Some sort of loop I can do in the change event?

    Thank you!

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hide/Unhide Rows based on Cell Content (Row on sheet 1 has yes/same row on sheet2 visb

    Your current change event code would help, but I suggest that first you limit the event's checking to only when your intended range changes. I gather your rows are all from 14 to 44?

    something like this might work:

    Please Login or Register  to view this content.
    Last edited by Arkadi; 09-22-2014 at 12:59 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Hide/Unhide Rows based on Cell Content (Row on sheet 1 has yes/same row on sheet2 visb

    So I put a helper cell on the 2nd sheet that equals the yes/no cell on sheet 1
    This is working, but I wonder if there is something better. I can call this from the worksheet change event or from the worksheet activate event - not sure which is better or why.

    Please Login or Register  to view this content.
    Last edited by ker9; 09-22-2014 at 01:10 PM.

+ 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. Replies: 1
    Last Post: 05-14-2013, 06:46 PM
  2. Hide/Unhide Rows Based On Cell Value
    By ZooTV92 in forum Excel General
    Replies: 5
    Last Post: 09-05-2011, 07:51 AM
  3. Hide / Unhide rows based on cell content
    By KaFi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-30-2010, 06:03 PM
  4. Unhide / Hide Rows Based on Cell Value
    By bradaresnick in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-02-2010, 10:02 AM
  5. hide/unhide rows based on cell value
    By alexandruc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-12-2009, 06:49 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