+ Reply to Thread
Results 1 to 10 of 10

Show Columns Matching Cell

  1. #1
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Show Columns Matching Cell

    I have found a few related answers but could not modify the code to work for my application.

    I need to check cells F2:AR2 against D2 for a match and hide all columns not matching. Then also hide any values in F8:AR8 >1.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Show Columns Matching Cell

    Hi

    How about

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Re: Show Columns Matching Cell

    This results in hiding the entire range. The match is looking for day of week, (Mon, Tue, Wed...) in F2:AR2. Does it matter if the day of week in the range is from a formula?

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Show Columns Matching Cell

    Hi

    How about an example file showing the before and after situations and explaining why things are hidden and why they are left visble.

    rylo

  5. #5
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Re: Show Columns Matching Cell

    Thank you for taking a look rylo;

    I attached a sheet with the data values. I am looking for a way to quickly allow others to compare the data for the same day of the week over the course of a date range. This format is dictated to me so I am trying to maximize what I have.

    I will place a drop down in D2 for the day of week selection. Will need a Show All option too...
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Show Columns Matching Cell

    Hi

    So what about the requirement for row 8 >1 to be hidden? Given this file, the only one that would remain visible would be AJ if you select Friday.


    rylo

  7. #7
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Re: Show Columns Matching Cell

    Quote Originally Posted by rylo View Post
    Hi

    So what about the requirement for row 8 >1 to be hidden? Given this file, the only one that would remain visible would be AJ if you select Friday.


    rylo

    That was my typo, it should have been <1. That fixes that issue. I think I can handle it from there. Thanks again!
    Last edited by Kingprawn; 10-24-2012 at 12:18 AM.

  8. #8
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Re: Show Columns Matching Cell

    I broke it when I tried to add the Worksheet_Change

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Show Columns Matching Cell

    Hi

    Try this

    Please Login or Register  to view this content.
    I've also changed the final cell selection to be E1 instead of F1 as column F may be hidden at some stage.

    rylo

  10. #10
    Registered User
    Join Date
    04-12-2010
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2021
    Posts
    9

    Re: Show Columns Matching Cell

    Perfect, it seems so simple when I see it. Need to commit to learning the language. Thank you kindly again.

+ 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