Julie,
Thank you for responding. Your macro has gotten me past the first step to
what I'm eventually trying to acheive. Unfortunately, I left out (quite) a
few more functions that I'd like for this macro to do as well. Hopefully,
you can still help. Can this macro be modified to either unhide one row at a
time so that when everytime the User populates a cell, the following row
becomes unhidden. Besides my wksht (entitled "EXP RPT") being protected
(password "lindAP"), I've allocated 7 rows (18-24) for the User to populate,
if necessary. Cells "F18: F24" each containing a drop down list of 7 items
(via data validation). In order to minimize space, I've hidden rows 19:24
and have instructed the User to only unhide these rows as needed. Obviously,
row 18 is always visable when the User opens up this file. My goal is to
have these rows unhide/hide automatically. For example, lets say the User
populates (via drop down list or manual entry) cell "F18", I'd then like for
row 19 to automatically become visable while rows 20:24 remain hidden. Once
again, If the User populates cell "F19", the following row (20) will
automatically become available while rows 21:24 will remain hidden. Now on
the other hand, let's say the User decides to unpopulate cell "F20", I'd like
for this cell and corresponding row to revert back to its hidden state.
However, only under the condition that cell "BC20" (which represents the sum
of cells K20:BB20) equals zero. This will assure me that the hidden rows
from this group of cells equal zero. Now to add even more complexity, this
wksht is linked to another wksht (within the same wkbk) entitled "WKLY RPT".
I'd like for the rows in the "WKLY RPT" wksht to correspond with the
hide/unhide commands reflected in the "EXP RPT" wksht. Sorry for being so
detailed, but I didn't know how else to get information across.
Any assistance would be greatly appreciated!!
"JulieD" wrote:
Hi
you'll have to use a Worksheet_Change event e.g.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target.Value < "" Then
Rows("2:20").EntireRow.Hidden = True
Select Case Target.Value
Case "cat"
Rows("2:10").EntireRow.Hidden = False
Case "dog"
Rows("11:15").EntireRow.Hidden = False
Case Else
Rows("16:20").EntireRow.Hidden = False
End Select
End If
End Sub
------
to use this code, right mouse click on the sheet tab with your data
validation drop down box on it and choose view code
copy & paste the code into the right hand side of the screen
.... you'll then need to change target.address to the cell with your data
validation box in it
.....the "cat" and "dog" to actual options in your data validation drop down
box
and the row numbers
then use ALT & F11 to switch back to your worksheet and try it out.
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Mr. G." wrote in message
...
How do you open a (group of) hidden rows automatically upon the User
populating a cell(s) from a drop down list (via data validation)?