+ Reply to Thread
Results 1 to 3 of 3

Hiding Columns based on Cell value

  1. #1
    Registered User
    Join Date
    12-07-2013
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    91

    Hiding Columns based on Cell value

    I have a userform that creates a new workbook, everything works but i am having hard time hiding columns based on a cell value.

    If cell S2 = protocol, then i would like for column E to be hidden. How would i write this? the one below does not work for me


    the code in its entirety and my issue in red font
    Please Login or Register  to view this content.

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

    Re: Hiding Columns based on Cell value

    protocol is a string and needs to be encased in quotes

    If ActiveSheet.Range("S2").Value = "protocol" Then

    Note: Also be aware of case sensitivity.

  3. #3
    Registered User
    Join Date
    12-07-2013
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    91

    Re: Hiding Columns based on Cell value

    Awesome. It was the case sensitivity.

    thanks!!!!

+ 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] 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
  2. Hiding Columns based on Cell Value
    By Dynamo418 in forum Excel General
    Replies: 1
    Last Post: 08-08-2012, 08:21 PM
  3. 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
  4. 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
  5. 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