Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have two sheets in my file.
Here is what I need to do: If a box in sheet1 has an "x" I want a column (sometimes 2 or 3 columns) on sheet2 to automatically hide. Thank you for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is a "box" and how does the "x" get into that box?
Assume your subject is correct and you mean "cell", you could use some event code to do the job. Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error GoTo stoppit Application.EnableEvents = False If Target.Address = "$A$2" And Target.Value = "x" Then Sheets("Sheet2").Range("A:A").EntireColumn.Hidden = True End If stoppit: Application.EnableEvents = True End Sub Gord On Fri, 10 Feb 2012 10:44:00 -0800 (PST), tr2yhb wrote: I have two sheets in my file. Here is what I need to do: If a box in sheet1 has an "x" I want a column (sometimes 2 or 3 columns) on sheet2 to automatically hide. Thank you for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hiding row if the cell is found in a differeent column | Excel Programming | |||
Hiding all rows where the cell value in column 13 of same row = $0.00 | Excel Programming | |||
Hiding all rows where the cell value in column 13 of same row = $0.00 | Excel Programming | |||
Hiding column if cell in previous column is empty-revised | Excel Programming | |||
autoamtically hiding a column after moving to a next cell outside | Excel Programming |