![]() |
Macro - hide rows that are 0 without an auto-filter
Hello:
I would like a macro to review rows 7-435 and if Col F = zero, then hide that row so that only rows that contain 0 show at the completion of the macro. I can't add an auto-filter to help acheive this because I already have an auto-filter on a section that is located beneath row 435. Any ideas? thank you! |
Macro - hide rows that are 0 without an auto-filter
Sub Hide_Zeros_Rows()
Dim RngCol As Range Dim i As Range Set RngCol = Range("F7:F435") For Each i In RngCol If i.Value = 0 Then _ i.EntireRow.Hidden = True Next i End Sub Gord Dibben MS Excel MVP On Tue, 9 Feb 2010 14:23:01 -0800, Roady wrote: Hello: I would like a macro to review rows 7-435 and if Col F = zero, then hide that row so that only rows that contain 0 show at the completion of the macro. I can't add an auto-filter to help acheive this because I already have an auto-filter on a section that is located beneath row 435. Any ideas? thank you! |
Macro - hide rows that are 0 without an auto-filter
worked like a charm!! THANK YOU, Gord!!
"Gord Dibben" wrote: Sub Hide_Zeros_Rows() Dim RngCol As Range Dim i As Range Set RngCol = Range("F7:F435") For Each i In RngCol If i.Value = 0 Then _ i.EntireRow.Hidden = True Next i End Sub Gord Dibben MS Excel MVP On Tue, 9 Feb 2010 14:23:01 -0800, Roady wrote: Hello: I would like a macro to review rows 7-435 and if Col F = zero, then hide that row so that only rows that contain 0 show at the completion of the macro. I can't add an auto-filter to help acheive this because I already have an auto-filter on a section that is located beneath row 435. Any ideas? thank you! . |
Macro - hide rows that are 0 without an auto-filter
You're welcome.
Thanks for the feedback. Gord On Wed, 10 Feb 2010 07:28:06 -0800, Roady wrote: worked like a charm!! THANK YOU, Gord!! "Gord Dibben" wrote: Sub Hide_Zeros_Rows() Dim RngCol As Range Dim i As Range Set RngCol = Range("F7:F435") For Each i In RngCol If i.Value = 0 Then _ i.EntireRow.Hidden = True Next i End Sub Gord Dibben MS Excel MVP On Tue, 9 Feb 2010 14:23:01 -0800, Roady wrote: Hello: I would like a macro to review rows 7-435 and if Col F = zero, then hide that row so that only rows that contain 0 show at the completion of the macro. I can't add an auto-filter to help acheive this because I already have an auto-filter on a section that is located beneath row 435. Any ideas? thank you! . |
All times are GMT +1. The time now is 02:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com