![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, i can hide Unhide 1 row With:
Option Explicit If Range ("D6") = 0 Then Range("D6").EntireRow.Hidden = True If Range ("D6") > 0 Then Range("D6").EntireRow.Hidden = False --------- What i'm trying to achive is: If the Range of ("D6:D1000")has a "0" then that row is hidden Thanks for any help, James |
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
Try: Sub ToggleHide() Range("D6").EntireRow.Hidden = (Range("D6").Text = "0") End Sub You cannot use just Range("D6") as this is the same as Range("D6").Value and the Value of an empty cell is zero, ulles that is what you want of course. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|