+ Reply to Thread
Results 1 to 5 of 5

Show/Hide columns by checkbox and cell text

  1. #1
    Registered User
    Join Date
    11-08-2010
    Location
    Charleston, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Red face Show/Hide columns by checkbox and cell text

    Hello, I have been searching on this topic for way too long and decided to just try my luck and see if anyone can help me. I couldn't find any code that matched exactly what I needed and I'm not savvy enough with VBA to figure out how to tailor it to my needs.

    I have a worksheet with 4 checkboxes - Entry, Intermediate, Advanced, and Expert. I want to show/hide columns starting with Column C that have text in Row 3 matching the checkbox. So if Intermediate and Advanced checkboxes are checked, only columns with Intermediate or Advanced in C3 will be visible and columns with Entry or Expert will be hidden.

    Any advice would be greatly appreciated!

    Thanks
    Last edited by ksmoore; 11-09-2010 at 02:22 PM.

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Show/Hide columns by checkbox and cell text

    Without seeing your setup...etc this is the code for the checkbox named entry
    Please Login or Register  to view this content.
    Not all forums are the same - seek and you shall find

  3. #3
    Registered User
    Join Date
    11-08-2010
    Location
    Charleston, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Show/Hide columns by checkbox and cell text

    Ok, great! It's almost there. With just one checkbox it works perfectly but I attempted to add the additional checkboxes and something is not right. I ran into something similar before and just added a line at the beginning showing all columns, but it is not working properly this time.

    The code I have so far that follows the previous post is:
    Please Login or Register  to view this content.
    Any advice for how to update the sheet on each checkbox selection would be greatly appreciated!

    Thanks again.

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Show/Hide columns by checkbox and cell text

    How about posting the workbook? it'd be a lot easier

  5. #5
    Registered User
    Join Date
    11-08-2010
    Location
    Charleston, SC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Show/Hide columns by checkbox and cell text

    I figured out what I was doing wrong. I needed to make each checkbox an individual function (as the first solution shows), the code I posted would only update with changes to checkbox1. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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