I have a project I'm working on where I need to hide up to 8 worksheets based on the value in a master sheet. essentially I have 8 different data sheets with 50 sections of data on each sheet and I want to hide any sheets that do not have data on them, once I hit 51 pieces of data the second sheet needs to become visible so with 0 data sets I wantonly the master sheet to show, 1-50 Data sheet 1, 51-100 Data sheets 1 & 2, 101-150 1 2 & 3 and so on up to 8 sheets. The data source is a count formula derived from the true false answers from check boxes. i figured out how to do it partially but it will not automatically update using the method I found.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Me.Range("DC417").Address Then
Sheets("Data Sheet 1").Visible = Target.Value > "0"
Sheets("Data Sheet 2").Visible = Target.Value > "50"
Sheets("Data Sheet 3").Visible = Target.Value > "100"
Sheets("Data Sheet 4").Visible = Target.Value > "150"
Sheets("Data Sheet 5").Visible = Target.Value > "200"
Sheets("Data Sheet 6").Visible = Target.Value > "250"
Sheets("Data Sheet 7").Visible = Target.Value > "300"
Sheets("Data Sheet 8").Visible = Target.Value > "350"
End If
End Sub
how can I make it so the sheets will automatically unhide as the data count hits 51, or 101 and so on?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Me.Range("DC417").Address Then
Sheets("Data Sheet 1").Visible = Target.Value > "0"
Sheets("Data Sheet 2").Visible = Target.Value > "50"
Sheets("Data Sheet 3").Visible = Target.Value > "100"
Sheets("Data Sheet 4").Visible = Target.Value > "150"
Sheets("Data Sheet 5").Visible = Target.Value > "200"
Sheets("Data Sheet 6").Visible = Target.Value > "250"
Sheets("Data Sheet 7").Visible = Target.Value > "300"
Sheets("Data Sheet 8").Visible = Target.Value > "350"
End If
End Sub
how can I make it so the sheets will automatically unhide as the data count hits 51, or 101 and so on?