+ Reply to Thread
Results 1 to 3 of 3

Hiding Columns based on Value in a Cell

  1. #1
    Registered User
    Join Date
    07-22-2015
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    2013
    Posts
    2

    Hiding Columns based on Value in a Cell

    So I have the following code that works perfectly on a single column and does exactly what I want it to do.

    If Range("E23").Value = 1 Then
    Columns("E").EntireColumn.Hidden = True
    Else
    Columns("E").EntireColumn.Hidden = False
    End If

    What I need to do now is run this IF statement through several hundred columns. How do I code this to loop the IF statement through columns E through FG?

    Thanks for any help!

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hiding Columns based on Value in a Cell

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-22-2015
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    2013
    Posts
    2

    Re: Hiding Columns based on Value in a Cell

    Awesome! Thanks for your help.

+ 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. Hiding Multiple Columns based on Cell Value
    By simon_geoghegan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2015, 09:06 AM
  2. Hiding Columns based on Cell value
    By honger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2014, 02:44 PM
  3. [SOLVED] Hiding columns based on cell value (ListBox)
    By Big_Tater in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2013, 10:38 PM
  4. Hiding Columns based on Cell Value
    By Dynamo418 in forum Excel General
    Replies: 1
    Last Post: 08-08-2012, 08:21 PM
  5. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 10-30-2011, 09:24 AM
  6. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2011, 06:49 AM
  7. VBA code for hiding columns based on cell value
    By Aramis06 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2010, 01:21 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