Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
more help with a hide macro
Hello again,
I got some help with a hide macro for searching for a spcific word, and it worked great. Now i'm trying to hide any row that has a 0 value in the b column. if it is any other number. I want it to remain. I tried changing the macro, but it hides everything and can't get it to work. Any help would be greatly appreciated. Thanks, Aaron |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
more help with a hide macro
With only limited information:
set rng = Columns(2).SpecialCells(xlConstants,xlNumbers) for each cell in rng if cell.Value = 0 then cell.EntireRow.Hidden = True else cell.Entirerow.Hidden = False end if Next if the zeros are produce by formula, change xlconstants to xlFormulas -- Regards, Tom Ogilvy "Awoll" wrote in message ... Hello again, I got some help with a hide macro for searching for a spcific word, and it worked great. Now i'm trying to hide any row that has a 0 value in the b column. if it is any other number. I want it to remain. I tried changing the macro, but it hides everything and can't get it to work. Any help would be greatly appreciated. Thanks, Aaron |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
more help with a hide macro
Awsome, the zero are produced by a if function so i'm hoping that the
xlForumulas will work. Is there anyway to specify the worksheet that it runs on? "Tom Ogilvy" wrote in message ... With only limited information: set rng = Columns(2).SpecialCells(xlConstants,xlNumbers) for each cell in rng if cell.Value = 0 then cell.EntireRow.Hidden = True else cell.Entirerow.Hidden = False end if Next if the zeros are produce by formula, change xlconstants to xlFormulas -- Regards, Tom Ogilvy "Awoll" wrote in message ... Hello again, I got some help with a hide macro for searching for a spcific word, and it worked great. Now i'm trying to hide any row that has a 0 value in the b column. if it is any other number. I want it to remain. I tried changing the macro, but it hides everything and can't get it to work. Any help would be greatly appreciated. Thanks, Aaron |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
more help with a hide macro
Dim rng as Range, cell as Range
With Worksheets("Sheet3") set rng = .Columns(2).SpecialCells(xlFormulas,xlNumbers) End With for each cell in rng if cell.Value = 0 then cell.EntireRow.Hidden = True else cell.Entirerow.Hidden = False end if Next -- Regards, Tom Ogilvy "Awoll" wrote in message ... Awsome, the zero are produced by a if function so i'm hoping that the xlForumulas will work. Is there anyway to specify the worksheet that it runs on? "Tom Ogilvy" wrote in message ... With only limited information: set rng = Columns(2).SpecialCells(xlConstants,xlNumbers) for each cell in rng if cell.Value = 0 then cell.EntireRow.Hidden = True else cell.Entirerow.Hidden = False end if Next if the zeros are produce by formula, change xlconstants to xlFormulas -- Regards, Tom Ogilvy "Awoll" wrote in message ... Hello again, I got some help with a hide macro for searching for a spcific word, and it worked great. Now i'm trying to hide any row that has a 0 value in the b column. if it is any other number. I want it to remain. I tried changing the macro, but it hides everything and can't get it to work. Any help would be greatly appreciated. Thanks, Aaron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide a Macro | Excel Discussion (Misc queries) | |||
macro to hide row with 0.00 | Excel Worksheet Functions | |||
macro to hide columns | Excel Worksheet Functions | |||
Macro to hide rows | Excel Programming | |||
Hide/Unhide Macro bug | Excel Programming |