Forum Discussion

StijnCl's avatar
StijnCl
Copper Contributor
May 12, 2020
Solved

Invisable Rows

Question

How do I create (in)visible cells based on a value in a certain cell?

Specifications
In an Excel file I created I have a number of rows that only need to be visible when a certain question is "yes". The closed question "Yes" / "No" (In Dutch "Ja" / "Nee") is in cell B35. For this I made a Dropdown-menu where the choice is made possible. The rows that need to be visible when the answer in cell B35 is "Ja" in the Excel file are 36:44. What's the easiest way to do this?

8 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    StijnCl 

    VBA if you'd like to hide entire rows.

    If to hide cells values in these rows you may apply conditional formatting rule applying white on white color for them (or like). However, they will be visible in formula bar if user focuses on such cell.

    • StijnCl's avatar
      StijnCl
      Copper Contributor

      Thank your for your answer SergeiBaklan !
      Unfortunately I can't write a VBA-code that's why I have this question.

    • StijnCl's avatar
      StijnCl
      Copper Contributor

      Thank you for your response bhushan_z !
      I'm wondering which VBA-Code I need. I know how I find the VBA-code but I would like to know how I should write this code.

      • bhushan_z's avatar
        bhushan_z
        Iron Contributor

        StijnCl you will need a macro that runs every time a cell value changes (event-driven macro)

        you can google it

         

        Also, if you want me to build the code,

        is it possible for you to share the file?
        You may remove confidential info from the file.

Resources