Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to scan rows in a range and hide them according to
the value of one of their columns. Basically: For Cell= E1 to E650 if E(XX)=0 hide row where E(XX) is. Next Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try: Sub hide_rows() Dim RowNdx As Long Dim LastRow As Long application.screenupdating=false LastRow = ActiveSheet.Cells(Rows.Count, "E").End(xlUp).row For RowNdx = LastRow To 1 Step -1 if cells(RowNdx,"E").value=0 then Rows(RowNdx).hidden = True End If Next RowNdx application.screenupdating=true End Sub -- Regards Frank Kabel Frankfurt, Germany "Henri" schrieb im Newsbeitrag ... I need to scan rows in a range and hide them according to the value of one of their columns. Basically: For Cell= E1 to E650 if E(XX)=0 hide row where E(XX) is. Next Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It looks like it's working.
Thanks to all of you ! -----Original Message----- Hi try: Sub hide_rows() Dim RowNdx As Long Dim LastRow As Long application.screenupdating=false LastRow = ActiveSheet.Cells(Rows.Count, "E").End(xlUp).row For RowNdx = LastRow To 1 Step -1 if cells(RowNdx,"E").value=0 then Rows(RowNdx).hidden = True End If Next RowNdx application.screenupdating=true End Sub -- Regards Frank Kabel Frankfurt, Germany "Henri" schrieb im Newsbeitrag ... I need to scan rows in a range and hide them according to the value of one of their columns. Basically: For Cell= E1 to E650 if E(XX)=0 hide row where E(XX) is. Next Thanks in advance . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this Henri
Sub Example2() Dim Lrow As Long Dim CalcMode As Long Dim StartRow As Long Dim EndRow As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With With ActiveSheet .DisplayPageBreaks = False StartRow = 1 EndRow = 650 For Lrow = EndRow To StartRow Step -1 If IsError(.Cells(Lrow, "E").Value) Then 'Do nothing, This avoid a error if there is a error in the cell ElseIf .Cells(Lrow, "E").Value = "0" Then .Rows(Lrow).Hidden = True End If Next End With With Application .ScreenUpdating = True .Calculation = CalcMode End With End Sub My new add-in have this option also http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Henri" wrote in message ... I need to scan rows in a range and hide them according to the value of one of their columns. Basically: For Cell= E1 to E650 if E(XX)=0 hide row where E(XX) is. Next Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditionally join rows | Excel Discussion (Misc queries) | |||
Way to conditionally hide rows? | Excel Worksheet Functions | |||
Conditionally formatting rows | Excel Worksheet Functions | |||
Conditionally Hide Rows | Excel Discussion (Misc queries) | |||
Hiding Rows Conditionally | Excel Discussion (Misc queries) |