+ Reply to Thread
Results 1 to 4 of 4

Hide Cells Based on a Value

  1. #1
    Registered User
    Join Date
    01-31-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    2

    Hide Cells Based on a Value

    First time posting here..... I apologize for my ignorance.

    I think I have a relatively easy task. I have a spreadsheet that contains about 75 questions that fall in 7 categories based on dollars values in 7 cells. I will outline the logic.

    If F11 does not equal 0, hide rows 48 - 66

    If G11 does not equal 0, hide rows 67 - 79

    If H11 does not equal 0, hide rows 93 - 95

    If I11 AND L11 do not equal 0, hide rows 85 - 92

    If H11 does not equal 0, hide rows 96 -110

    If K11 does not equal 0, hide rows 80 - 84

    I have not used VBA before, but if someone could show me how to complete the first criteria, I should be able to replicate it for the rest of the results. I would also need to know how to have multiple conditions in one button.

    Thank you for anyone that is kind enough to offer assistance.

    Thanks,

    Nick

  2. #2
    Registered User
    Join Date
    01-28-2013
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Hide Cells Based on a Value

    Written this to unhide when conditions aren't met.
    • Click on Visual Basic under the Developer tab.
    • Click on the Module1 on LHS, and paste this into the editor window (and add the other logic).
    • Click on Developers/Macro to run and test.
    • Click on Developers/Insert/Form Controls to draw a button (and it prompts you to choose a macro (choose the name of the subroutine....eg hideQuestions)).

    If Developer ribbon is not visible you can switch it on under the Excel Options box.

    Please Login or Register  to view this content.
    HTH
    Last edited by OfficeCoach; 01-31-2013 at 06:22 PM. Reason: added comment about Module1

  3. #3
    Registered User
    Join Date
    01-31-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Hide Cells Based on a Value

    Worked perfect! Thank you very much. Any books you suggest as a good reference for future solutions.

    Thanks again!

  4. #4
    Registered User
    Join Date
    01-28-2013
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Hide Cells Based on a Value

    Cheers :-)

    I'm sad to say I barely use books anymore.....it's all a combination of Google, Youtube and forums like these now! Not good for the memory cells(!) but a very quick way to find solutions.

+ 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