Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Sep 6, 2:42 pm, Zoltan wrote:
Hello, try this: Private Sub CommandButton1_Click() Dim mycell As Range Dim rng As Range Set rng = Range("L5:L100") For Each mycell In rng If mycell.Value = 0 Then Rows(mycell.Row).Hidden = True End If Next End Sub It goes thru the range and check each cell. If cell value is 0, then it hides that specific row. I hope I understood well your question. Regards, Zoltan "realmani" wrote: I have data range L5:L100 which contains numbers. I want an event proceedure which hide the rows if cell value is equal to zero. Further i want this event proceedure assign to a button. Clicking on it will perform the above task Could anyone help? Thank you very much Zoltan!!!! that works perfectly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding Specific Rows Based on Values in Other Rows | Excel Worksheet Functions | |||
hiding rows based on cell contents | Excel Discussion (Misc queries) | |||
Hiding rows based on a value | Excel Discussion (Misc queries) | |||
Hiding Rows Based on Percentile | Excel Discussion (Misc queries) | |||
Hiding rows based on date | Excel Worksheet Functions |