+ Reply to Thread
Results 1 to 2 of 2

Auto hiding coloums based on color

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    22

    Auto hiding coloums based on color

    Hello im new here and i was wondering if i could get some help on auto hiding coloums based on their color?

    Would this code do what i want?

    Sub hide_sheet2()
    'hide empty tech rows
    Dim rng, cells As Range

    Set rng = Range("d2:gp2")

    Application.ScreenUpdating = False

    For Each cell In rng
    If cell.Interior.Color = RGB(255, 255, 153) Then
    cell.EntireColumn.Hidden = True
    End If
    Next cell

    Application.ScreenUpdating = True

    End Sub
    Last edited by TlgKill; 06-05-2013 at 05:53 PM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Auto hiding coloums based on color

    Yes, surely the posted code will work fine


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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