+ Reply to Thread
Results 1 to 11 of 11

Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Hello.

    Please see the attached file.

    I have maps of an area. There are going to be approx 7 of them varying in colour, shape, text and figures.
    (there are 3 in my attached example)

    I was hoping (if possible) to only show one map at a time.
    So if i want to view the "zones incidents" map i can click "zones incidents" in a drop down menu or radio button and it will appear.

    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Hello
    Not sure if you were looking to do this with VBA but it could be done using Conditional Formatting. See attached example. It hides the non-selected ranges by formatting them to match the background colour.

    Hope this helps.
    DBY
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    thanks for the effort.

    the reason behind my idea is so there is no need to scroll to view a new map. with your solution, the maps are still located in different areas which require you to scroll to view them.

    is it not possible to have them in the same position as you select each one?
    thanks

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Here is a solution that uses VBA. It hides all columns except the ones you want to see. This assumes that the blocks of data are distributed horizontally, as in your example.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    thanks!!
    that works great

    im currently at work so i cant test this on my mac.
    does it involve activex. if it does then it wont work on a mac

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    If you only need to see the map and VBA is not an option on your mac, then perhaps you could use a picture lookup. With your maps on one sheet and named as a reference. See new attachment.

    DBY
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    thats great!!
    can you please explain to me how you do that DBY

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Unfortunately my solution uses ActiveX option buttons and I didn't realize that wouldn't work on a Mac. I have no experience using Office on a Mac.

  9. #9
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Each of your Maps are created as Named Ranges. I then created another named range in this instance I chose 'Zone' which uses the Indirect function linked to the drop-down cell with the following formula:

    Please Login or Register  to view this content.
    Named ranges cannot have spaces so the Substitute function replaces those with an ( _ ) underscore.

    You then select and copy the one of the Maps/Range and use Paste Special to paste it as a Picture Link. Then select the picture and in the formula bar type: =Zone

    DBY

  10. #10
    Forum Contributor
    Join Date
    03-20-2013
    Location
    London, England
    MS-Off Ver
    Excel 2011
    Posts
    474

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    "I then created another named range in this instance I chose 'Zone' which uses the Indirect function linked to the drop-down cell with the following formula:"

    i dont understand this bit. where did you insert the formula?

  11. #11
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Possible to make blocks of cells hide/unhide with a drop down menu or radio buttons

    Sorry I had to log off yesterday. You insert the formula when creating the new name from the Formulas Tab > Define Name . See attached image.

    New Name.JPG

    DBY

+ 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. How to Hide/Unhide Command Buttons along with Columns
    By EddieN1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 09:53 AM
  2. Auto Hide/Unhide rows in Excel based on radio button selection
    By awill110 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2013, 03:05 PM
  3. [SOLVED] Buttons need to hide/unhide along with columns
    By rowlandjp in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-28-2012, 03:29 PM
  4. Displaced control buttons after hide unhide
    By reinkonemann in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2011, 10:36 AM
  5. I am missing something (hide / unhide rows with buttons)
    By Turquoise_dax in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2006, 01:01 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