Unhiding Columns only with VALUE

  • Morning All ..hoping I could get some help.


    I have columns AJ-BG opening for a reassessment .. but there are 3 types of re-assessments. AJ:AO .. AR:AX .. BA:BG. I only want certain columns to UNHIDE if there is value in AJ, AR or BA.


    This is what I was given, but it doesn't work. Can anyone help out?


    [vba]
    Sub reassess_open()
    '
    ' reassess_open Macro
    ' Macro recorded 16/12/2005 by Tayler Reid
    '
    If Range("AJ5:AJ105").Value Then
    Range("AJ:AO").Columns.Hidden = False
    If Range("AR5:AR105").Value Then
    Range("AR:AX").Columns.Hidden = False
    If Range("BA5:BA105").Value Then
    Range("BA:BG").Columns.Hidden = False
    Cells(ActiveCell.Row, 35).Select
    End If
    End If
    End If
    End Sub[/vba]

  • Re: Unhiding Columns only with VALUE


    Put something like this:



    in a module in VBA. Let us know whether that's what you need or not.


    Grtz


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!