If I understand you correctly, you would like to hide the column on Sheet - Data which corresponds to the row 7 on Sheet1 where you place a 1.
Example:
If I place a 1 in A7 column A will hide on Sheet - Data and then I place a 1 in B7, column B with hide on Sheet - Data. If I then place a zero or some non 1 vaule in A7, column A will unhide on Sheet - Data but column B is still hidden.
Private Sub Worksheet_change(ByVal Target As Range)
Dim myCol As Long
myCol = ActiveCell.Column
If Sheets("Sheet1").Cells(7, ActiveCell.Column) = 1 Then
Sheets("Data").Columns(myCol).EntireColumn.Hidden = True
ElseIf Sheets("Sheet1").Cells(7, ActiveCell.Column) <> 1 Then
Sheets("Data").Columns(myCol).EntireColumn.Hidden = False
End If
End Sub
Bookmarks