A
A. Karatas
I am making a database in excel in which two types of information is
beeing produced. Yearly figures and year to date figures. Both type's
consist of multiple sheets (more that 20 is normal), with details
about certain markets. By a dropdown menu i would like to have a
selection on seeing only the sheets in producing the yearly figures or
the YTD figures.
I have the following working on one sheet, but I don't want to write
it for each sheet with a different name. I also noticed that when I
change the sheetname the macro quits working.
Dim sh As Worksheet
Set sh = Worksheets("Assumptions")
With Sheets("P&L current")
If sh.Range("Ae1").Value = 2 Then
.Visible = xlSheetVisible
ElseIf sh.Range("Ae1").Value = 1 Then
.Visible = xlSheetHidden
End If
The dropdown menu puts the value 1 or 2 in cell Ae1. is it possible
that a macro looks in every sheet for cell AE1 and hides or unhides it
by the value 1 or 2???
beeing produced. Yearly figures and year to date figures. Both type's
consist of multiple sheets (more that 20 is normal), with details
about certain markets. By a dropdown menu i would like to have a
selection on seeing only the sheets in producing the yearly figures or
the YTD figures.
I have the following working on one sheet, but I don't want to write
it for each sheet with a different name. I also noticed that when I
change the sheetname the macro quits working.
Dim sh As Worksheet
Set sh = Worksheets("Assumptions")
With Sheets("P&L current")
If sh.Range("Ae1").Value = 2 Then
.Visible = xlSheetVisible
ElseIf sh.Range("Ae1").Value = 1 Then
.Visible = xlSheetHidden
End If
The dropdown menu puts the value 1 or 2 in cell Ae1. is it possible
that a macro looks in every sheet for cell AE1 and hides or unhides it
by the value 1 or 2???