+ Reply to Thread
Results 1 to 6 of 6

Auto Hide Rows Based on Row Cell Value of NA

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Auto Hide Rows Based on Row Cell Value of NA

    Hi All,

    Have been searching the forum and have found some macros that I have tried to rework for my case but I can't seem to get it. I'm new to VBA so still learning. Here is what I want to do:

    When user selects drop down (there are two drop downs so when they select and change one or the other G3 and O3) I want the workbook macro to search the calculated cells (Row V4:V1001) and hide any rows that are #N/A. Each time the user selects from the drop down the #N/A Values will change so I need it to Unhide the rows then hide the new #N/A values.

    Thanks in advance!

    Dave

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

    Re: Auto Hide Rows Based on Row Cell Value of NA

    Try:

    Please Login or Register  to view this content.
    I assumed the #N/A was coming from a formula failure

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Auto Hide Rows Based on Row Cell Value of NA

    The formula is returning #N/A because of the two selected variables need to match in order for the value to be displayed. For example the user selects Return Visit under "Type of Visit" and selects Acute under "Client Group". Only the lengths of time for those matching that criteria are displayed in order to chart. Want to hide the rows that aren't applicable.

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

    Re: Auto Hide Rows Based on Row Cell Value of NA

    So......did the macro work for your needs? If not, where did it fail.

  5. #5
    Registered User
    Join Date
    04-04-2013
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Auto Hide Rows Based on Row Cell Value of NA

    Worked out perfectly. I'm still trying to figure out the code you wrote (what everything means exactly) but that's because I'm so new to VBA. Thanks for the reply and the help, it is much appreciated!

    Cheers,
    Dave

  6. #6
    Registered User
    Join Date
    06-05-2019
    Location
    Birmingham
    MS-Off Ver
    Version 1904
    Posts
    4

    Re: Auto Hide Rows Based on Row Cell Value of NA

    Hi,

    I need something similar guys. I've never worked with VBA before.

    I have a drop down list in a cell F4. My table is in cells A9:H39, and a column corresponding to drop down list is H (H9:H39) Depending on a choice from a drop down list, some of the cells in column H would show N/A. Upon a different choice from a drop down list, different cells would show as N/A. And I would need for the whole row to hide/unhide depending on whether there's a N/A in that "H" cell.

    Can anyone help?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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