+ Reply to Thread
Results 1 to 7 of 7

an answer in one cell unhides rows - possible?

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    34

    an answer in one cell unhides rows - possible?

    Hello, I suppose there is no such thing as a quick question (although all those who have helped me previously have proven this wrong), but please read on.

    I am adjusting/adding to a previously 'built by someone else' pricing calculator. Is it possible to have the following function?

    a drop down list on cell G5, gives you the options of yes or no. If you select yes, rows 120:123 (inclusive) are unhidden. If you select no, the same rows are hidden.

    I'm thinking this maybe more of a vb code solution but not sure what to do.
    I will wait patiently for your help

    Cheers guys

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: an answer in one cell unhides rows - possible?

    Place this macro in VB Editor in the sheet you have those cells.
    Please Login or Register  to view this content.
    I used data validation for cell G5. It can either take the values: Yes or No.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: an answer in one cell unhides rows - possible?

    A gentleman and a scholar, thank you for this - works perfect

  4. #4
    Registered User
    Join Date
    10-26-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: an answer in one cell unhides rows - possible?

    Just a quick one though, could you run a second code almost the same as this on the same worksheet? If so, how?

  5. #5
    Registered User
    Join Date
    10-26-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: an answer in one cell unhides rows - possible?

    Does anybody know how I would do this if I wanted to run this same code for the same page, but different rows from a different input cell?

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: an answer in one cell unhides rows - possible?

    Sorry about the delay.
    Please Login or Register  to view this content.
    You can add as many IF THEN ELSE as you want. Just modify the target cell and rows you want to alter.

  7. #7
    Registered User
    Join Date
    10-26-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: an answer in one cell unhides rows - possible?

    Thank you for this p24leclerc, they won't let me give you rep, but this is perfect

+ 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