+ Reply to Thread
Results 1 to 2 of 2

Hide Rows/Hide Columns Based on Value in Cell

  1. #1
    Registered User
    Join Date
    07-24-2015
    Location
    Chicago
    MS-Off Ver
    Excel2010
    Posts
    42

    Hide Rows/Hide Columns Based on Value in Cell

    Hello!

    I am just getting started in VBA, and am trying to figure out something that seems simple, but that I keep tripping on. In the same macro, I would like to be able to do the following two things for an entire worksheet

    Worksheet 1
    A B C D
    Red Blue Green Orange


    Worksheet 2

    Cell A5 = Red
    Cell A6 = Pink
    Cell A7 = Orange


    I need to show columns in Worksheet 1, where the values of cells A1, B1, C1 and D1 are equal to the values in CellA5, Cell A6, CellA7 of worksheet 2. So in the above example, the macro would hide Column B, Column C and Show Column A and Column D.

    Separately, I would love to be able to do a similar thing with rows.

    A
    North
    South
    East
    West
    Southwest
    Northwest

    I want to hide rows with the value "Northwest" and "Southwest", and show the rest.

    Thank you so much for your help!

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    California
    MS-Off Ver
    Excel 2013
    Posts
    321

    Re: Hide Rows/Hide Columns Based on Value in Cell

    Could you please upload a workbook?

+ 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. [SOLVED] Hide - Un Hide rows with empty columns
    By BDF in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-14-2014, 02:09 PM
  2. [SOLVED] Checkbox VBA - Hide/Unhide Rows and/or Columns based on cell values
    By gravy258 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 05:39 PM
  3. [SOLVED] Hide rows and columns based on a combobox value
    By yasirmusa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2012, 04:52 PM
  4. How to hide columns based on cell value in different rows
    By ludovic_44 in forum Excel General
    Replies: 5
    Last Post: 06-25-2012, 02:42 AM
  5. How to hide columns based on cell value in different rows
    By ludovic_44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-24-2012, 06:45 PM
  6. how to hide rows based on the value of two columns
    By salventuro in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-19-2009, 07:29 PM
  7. Hide Blank Rows based on 2 columns
    By yzer19 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2008, 11:23 AM

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