Home |
Search |
Today's Posts |
#1
|
|||
|
|||
hide rows in workbook
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 all 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 input sheet, the following worksheets should hide the rows 15:20. thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide rows in workbook
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 -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
|
|||
|
|||
awesome t works, however, how can i enter if the value is 55, then gide row 15-20, if value is 60 then hide row 20-25, and if value is 65 then do not hide any row.
Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Code for Excel 2007 to hide rows based on sum of several rows not ina range | Excel Programming | |||
How to hide rows in a Workbook with multiple sheets with zero valu | Excel Programming | |||
Hide rows with zero's on several sheets within a workbook | Excel Programming | |||
Specify which rows to NOT hide, and have excel hide the rest | Excel Programming |