Results 1 to 10 of 10

Hiding Columns in a table if ALL the cells in column are a certain value

Threaded View

Zach51215 Hiding Columns in a table if... 05-22-2013, 10:15 AM
krabine Re: Hiding Columns in a table... 05-22-2013, 10:29 AM
ragulduy Re: Hiding Columns in a table... 05-22-2013, 10:29 AM
Zach51215 Re: Hiding Columns in a table... 05-22-2013, 10:44 AM
Zach51215 Re: Hiding Columns in a table... 05-22-2013, 10:45 AM
ragulduy Re: Hiding Columns in a table... 05-22-2013, 11:26 AM
Zach51215 Re: Hiding Columns in a table... 05-22-2013, 01:19 PM
ragulduy Re: Hiding Columns in a table... 05-23-2013, 06:19 AM
Zach51215 Re: Hiding Columns in a table... 05-29-2013, 01:02 PM
ragulduy Re: Hiding Columns in a table... 05-30-2013, 04:21 AM
  1. #1
    Registered User
    Join Date
    05-22-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2007
    Posts
    15

    Hiding Columns in a table if ALL the cells in column are a certain value

    Hello All,
    Quick Question

    Data Parameters:
    A1 . . . BE1 = Column Headers of 'Table Names'
    A1
    .
    . = Row Headers of "Components available in table"
    .
    A554

    So basically my column headers are a bunch of different table names. My row headers are the various components that may be found in the table. If the component is found in the table then the cell has 'Y' for that particular column. If the component is not in the cell then the cell has 'N' for that particular column. Data Example:

    _________Table 1_____Table 2_____Table 3____Table 4
    Height______Y_________N___________N__________Y
    Weight_____Y__________Y___________N__________Y
    Name______N__________N___________N__________N
    Date_______Y__________Y___________Y__________Y

    So what I want it to do is when I run this (it will probably have to be a macro) is that if a column has all 'N''s then I want that column hidden. But EVERY component has to be 'N'. If there is a single 'Y' I want it displayed. I will probably set this macro as a button.

    What I will want as an end product is to be able to filter my table components (height, weight, name, date, etc). So if above is a before example (let's say I filter and remove the component 'Date") then after I run the macro I want to see:

    INTERMEDIATE STEP (IMMEDIATELY AFTER FILTERED, NOTICE ALL TABLE 3 CELLS ARE 'N')
    _________Table 1_____Table 2_____Table 3____Table 4
    Height______Y_________N___________N__________Y
    Weight_____Y__________Y___________N__________Y
    Name______N__________N___________N__________N

    FINAL PRODUCT (AFTER I CLICK THE RUN MACRO)
    _________Table 1_____Table 2____Table 4
    Height______Y_________N__________Y
    Weight_____Y__________Y__________Y
    Name______N__________N__________N


    I'm struggling with this because I'm new to vba programming. Please help. Thanks
    Last edited by Zach51215; 05-22-2013 at 10:18 AM.

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