Conditional hide column
Solved/Closed
Related:
- Conditional hide column
- How to hide app store on ipad - Guide
- Steam hide comments - Guide
- Quicktime hide controls - Guide
- How to see hide story on instagram - Guide
- Platinum hide ip - Download - VPN
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 21, 2011 at 09:54 PM
Jul 21, 2011 at 09:54 PM
i am rephrasing it
1. if type 1 in A1 column E should be hidden
2. If I type any other number column E should be visible
in that case
right click sheet tab and click view code
in the window that comes up copy this EVENT CODE
now type some number in A1. if it is 1 colum E will be hidden
if it some other number the column E will not be hidden
if you enter in any cell other than A1 nothing will happen
do some experiments.
1. if type 1 in A1 column E should be hidden
2. If I type any other number column E should be visible
in that case
right click sheet tab and click view code
in the window that comes up copy this EVENT CODE
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address <> "$A$1" Then Exit Sub If Target = 1 Then Range("e1").EntireColumn.Hidden = True Else Range("e1").EntireColumn.Hidden = False End If End Sub
now type some number in A1. if it is 1 colum E will be hidden
if it some other number the column E will not be hidden
if you enter in any cell other than A1 nothing will happen
do some experiments.