Sub hide_cols() For Each c In Worksheets("Sheet1").Range("A1:A15") If c.Value <> "x" Then Columns("A:N").

Hidden = True End If Next c End Sub --------------------------------------------------------------------------------------------------------------------------Sub unhide_cols() For Each c In Worksheets("Sheet1").Range("A1:N15") If c.Value <> "x" Then Columns("A:N").Hidden = False c.Value = "" End If Next c End Sub --------------------------------------------------------------------------------------------------------------------------Dim cl As Range, rTest As Range Set rTest = Range("a1", Range("a1").End(xlToRight)) For Each cl In rTest If Not cl.Value > 0 Then cl.EntireColumn.Hidden = True End If Next cl End Sub ---------------------------------------------------------------------------------------------------------------------Sub HideColumn1() If Range("B4").Value = 0 Then Columns("H").EntireColumn.Hidden = True Else Columns("H").EntireColumn.Hidden = False End If End Sub --------------------------------------------------------------------------------------------------------------------------Sub HideColumn1() If Range("D3").Value <> "x" Then Columns("D").EntireColumn.Hidden = True End If If Range("E3").Value <> "x" Then Columns("E").EntireColumn.Hidden = True End If If Range("F3").Value <> "x" Then Columns("F").EntireColumn.Hidden = True End If If Range("G3").Value <> "x" Then Columns("G").EntireColumn.Hidden = True End If If Range("H3").Value <> "x" Then Columns("H").EntireColumn.Hidden = True End If If Range("I3").Value <> "x" Then Columns("I").EntireColumn.Hidden = True End If If Range("J3").Value <> "x" Then Columns("J").EntireColumn.Hidden = True End If

Value <> "x" Then Columns("V").EntireColumn.EntireColumn.Value <> "x" Then Columns("S").Value <> "x" Then Columns("M").Hidden End If If Range("U3").Hidden End If If Range("V3").Value <> "x" Then Columns("N").EntireColumn.Hidden End If If Range("X3").Hidden = True End If If Range("AB3").Value <> "x" Then Columns("O").EntireColumn.EntireColumn.Hidden End If If Range("Y3").EntireColumn.Hidden End If If Range("Q3").Hidden End If = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True If Range("AA3").Value <> "x" Then Columns("Y").Hidden End If If Range("Z3").Value <> "x" Then Columns("W").Value <> "x" Then Columns("U").EntireColumn.EntireColumn.Hidden End If If Range("W3").Value <> "x" Then Columns("Q").Hidden End If If Range("T3").Hidden End If If Range("N3").EntireColumn.EntireColumn.Value <> "x" Then Columns("T").Hidden End If If Range("L3").EntireColumn.If Range("K3").Value <> "x" Then Columns("X").Value <> "x" Then Columns("K").EntireColumn.Value <> "x" Then Columns("R").Hidden End If If Range("S3").Hidden = True End If If Range("AD3").Value <> "x" Then Columns("AB").Value <> "x" Then Columns("Z").Value <> "x" Then Columns("AA").Value <> "x" Then Columns("L").Hidden End If If Range("R3").EntireColumn.EntireColumn.Value <> "x" Then Columns("P").Hidden = True End If If Range("AC3").EntireColumn.Hidden End If If Range("M3").Value <> "x" Then .EntireColumn.EntireColumn.EntireColumn.EntireColumn.Hidden End If If Range("O3").Value <> "x" Then Columns("AC").Hidden End If If Range("P3").

Value <> "x" Then Columns("AE").EntireColumn.Hidden End If If Range("AQ3").EntireColumn.Value <> "x" Then Columns("AS").Value <> "x" Then Columns("AK").EntireColumn.Hidden End If If Range("AI3").Value <> "x" Then Columns("AU").Hidden End If If Range("AN3").Value <> "x" Then = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True = True .Hidden End If If Range("AR3").Hidden End If If Range("AU3").EntireColumn.EntireColumn.Hidden End If If Range("AL3").Columns("AD").EntireColumn.EntireColumn.Hidden End If If Range("AX3").EntireColumn.EntireColumn.Value <> "x" Then Columns("AP").EntireColumn.Value <> "x" Then Columns("AH").EntireColumn.Value <> "x" Then Columns("AQ").Hidden End If If Range("AG3").Hidden End If If Range("AP3").EntireColumn.Hidden End If If Range("AO3").EntireColumn.Hidden End If If Range("AW3").Value <> "x" Then Columns("AT").Value <> "x" Then Columns("AR").Hidden End If If Range("AV3").Hidden End If If Range("AF3").EntireColumn.Hidden End If If Range("AE3").Value <> "x" Then Columns("AO").Value <> "x" Then Columns("AV").EntireColumn.Hidden End If If Range("AJ3").EntireColumn.Value <> "x" Then Columns("AN").Hidden End If If Range("AH3").Value <> "x" Then Columns("AW").Value <> "x" Then Columns("AM").Hidden End If If Range("AM3").Value <> "x" Then Columns("AF").EntireColumn.Hidden End If If Range("AT3").Value <> "x" Then Columns("AJ").Value <> "x" Then Columns("AL").EntireColumn.EntireColumn.Hidden End If If Range("AS3").Value <> "x" Then Columns("AG").Hidden End If If Range("AK3").Value <> "x" Then Columns("AI").EntireColumn.

EntireColumn.EntireColumn.Hidden = False Columns("C").EntireColumn.Hidden Columns("AQ").EntireColumn.EntireColumn.Hidden = False Columns("V").EntireColumn.Hidden Columns("AK").EntireColumn.Hidden Columns("AE").EntireColumn.Hidden Columns("AM").EntireColumn.Hidden = False Columns("L").EntireColumn.Hidden Columns("AS").EntireColumn.EntireColumn.EntireColumn.Hidden Columns("AT").EntireColumn.EntireColumn.EntireColumn.Hidden = False Columns("I").Hidden = False Columns("U").Hidden = False Columns("H").Hidden = False Columns("T").Hidden = False Columns("F").Hidden = False Columns("N").Hidden = False Columns("E").Hidden = True End If If Range("AZ3").EntireColumn.EntireColumn.Hidden Columns("AP").Hidden Columns("AV").Value <> "x" Then Columns("AY").Hidden = False Columns("B").EntireColumn.Hidden = False Columns("O").EntireColumn.Hidden = True End If End Sub Sub UnHideColumn1() Columns("A").EntireColumn.EntireColumn.EntireColumn.Hidden Columns("AW").EntireColumn.Value <> "x" Then Columns("AZ").Hidden Columns("AR").Hidden = True End If If Range("AY3").EntireColumn.Hidden = False Columns("K").EntireColumn.EntireColumn.EntireColumn.Hidden Columns("AC").Columns("AX").EntireColumn.Hidden = False Columns("W").Hidden Columns("AL").Hidden Columns("AI").Hidden = False Columns("AA").EntireColumn.Hidden = False Columns("Z").EntireColumn.Hidden = False Columns("J").EntireColumn.Hidden = False Columns("M").Hidden = False Columns("S").Hidden Columns("AU").EntireColumn.Hidden = False Columns("G").EntireColumn.EntireColumn.EntireColumn.EntireColumn.Hidden = False Columns("P").EntireColumn.Hidden Columns("AF").Hidden Columns("AB").EntireColumn.EntireColumn.Hidden = False Columns("Q").EntireColumn.EntireColumn.EntireColumn.Hidden Columns("AO").Hidden Columns("AD").Hidden = False Columns("X").EntireColumn.EntireColumn.EntireColumn.EntireColumn.EntireColumn.EntireColumn.EntireColumn.Hidden = False Columns("R").Hidden Columns("AH").Hidden = = = = = = = = = = = = = = = = = = = = = = = False False False False False False False False False False False False False False False False False False False False False False False .Hidden = False Columns("Y").Hidden Columns("AN").Hidden Columns("AG").Hidden Columns("AJ").Hidden = False Columns("D").EntireColumn.EntireColumn.

Hidden = False Columns("AZ").Hidden = False Columns("AY").Columns("AX").Hidden = False End Sub .EntireColumn.EntireColumn.EntireColumn.

Sign up to vote on this title
UsefulNot useful