+ Reply to Thread
Results 1 to 8 of 8

Hide or Unhide Rows/Columns Based on Condition

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    22

    Hide or Unhide Rows/Columns Based on Condition

    Hello,

    In the attached spreadsheet, I'm looking to have the graphs dynamically update on whether the names in the first tab are populated or not. In other words, if any of those names is blank, I'd like the graphs to truncate to only show the other two bars. I believe this can be done using VBA by having it hide/unhide columns O-Q and rows 52-54 dynamically depending on the inputs in the first tab, but not sure how to accomplish this. If you blank out an input in the first tab, the column & row in the second tab should hide, thus getting rid of that entry from the graphs....however, if you then put back in a name in that same first tab cell, the column & row should unhide, restoring that bar to the graphs. Thank you in advance for your help!
    Attached Files Attached Files

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

    Re: Hide or Unhide Rows/Columns Based on Condition

    Hi Rustico,

    This event in the Input Sheet module works except for the coloring on the bottom chart

    Please Login or Register  to view this content.
    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

  3. #3
    Registered User
    Join Date
    05-12-2016
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    22

    Re: Hide or Unhide Rows/Columns Based on Condition

    Hi Xladept,

    That definitely works. Can you help me modify that VBA code for this slightly different format? In the attached, I've moved the inputs onto the same "Summary" tab, and just added a few more graphs. This is exact format of my actual spreadsheet. Thank you!
    Attached Files Attached Files

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

    Re: Hide or Unhide Rows/Columns Based on Condition

    Try this:

    Please Login or Register  to view this content.
    The placing of the triggers seems a little awkward

  5. #5
    Registered User
    Join Date
    05-12-2016
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    22

    Re: Hide or Unhide Rows/Columns Based on Condition

    Sorry, one more iteration and then I'll be good to go. I changed attached file so that Row 13 lets you select whether you want them "Active" or "Off". If "Off", want to hide that row/column. Thank you so much for your help!
    Attached Files Attached Files

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

    Re: Hide or Unhide Rows/Columns Based on Condition

    Try this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-12-2016
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    22

    Re: Hide or Unhide Rows/Columns Based on Condition

    Fantastic. Really appreciate the help.

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

    Re: Hide or Unhide Rows/Columns Based on Condition

    You're welcome!

+ 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. Hide/Unhide Userform Text Box Based on Condition
    By lateniteNC1 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-15-2017, 10:41 AM
  2. Need to Hide/Unhide Rows and Columns Based on Several Date Ranges
    By zlorinc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2014, 04:32 PM
  3. [SOLVED] Checkbox VBA - Hide/Unhide Rows and/or Columns based on cell values
    By gravy258 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 05:39 PM
  4. How to Hide/Unhide rows based on condition
    By Kfir7 in forum Excel General
    Replies: 33
    Last Post: 01-07-2013, 12:55 PM
  5. How to hide and unhide Rows & Columns
    By Aarif in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2006, 01:25 AM
  6. Hide / Unhide columns and rows
    By PaulM in forum Excel General
    Replies: 8
    Last Post: 12-12-2005, 11:10 PM
  7. Code to hide and unhide columns, with certain condition?
    By Frederic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2005, 12: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