+ Reply to Thread
Results 1 to 3 of 3

Hide empty columns Toggle

Hybrid View

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    74

    Hide empty columns Toggle

    I need a toggle button that will hide any column in which row 38 is empty Between the columns "E" and "T" then when unclicked shows all the columns between "E" and "T"
    simple enough but I cannot get the toggle to recognize the difference between empty and filled cells.

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Hide empty columns Toggle

    will this do?

    Sub test()
    Dim Cell As Range
    
    For Each Cell In Range("E38:T38")
    If IsEmpty(Cell) = True Then
        Cell.EntireColumn.Hidden = Not Cell.EntireColumn.Hidden
        End If
        Next Cell
    
    End Sub
    Last edited by Bishonen; 10-05-2012 at 03:16 PM.
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Hide empty columns Toggle

    Yes, thank you.

+ 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