hide rows in workbook

U

Umesh Banga

hi,

i have a workbook with four scenarios and one input sheet.

in input sheet - there is cell to get the value of retirement age.

is it possible; that when i enter a certain age lets say 55, then in al
the other four scenario sheets should hide rows 15:20.

macro should pick the value from retiremnt age cell lets say b4
everytime it runs.

so in simple words, when i enter retirement age in cell b4 of inpu
sheet, the following worksheets should hide the rows 15:20.

thanks in advanc
 
C

Claus Busch

Hi Umesh,

Am Mon, 7 May 2012 12:23:18 +0000 schrieb Umesh Banga:
is it possible; that when i enter a certain age lets say 55, then in all
the other four scenario sheets should hide rows 15:20.

try in code module of input sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer

If Target.Address <> "$B$4" Or Target.Count > 1 _
Then Exit Sub

For i = 2 To Sheets.Count
Sheets(i).Rows("15:20").Hidden = Target = 55
Next
End Sub


Regards
Claus Busch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top