Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is a good macro to hide rows in a table selected range that have "0"
values? Reason for wanting this if I filter any one column for values of "0" then it is likely to hide values in other columns that are not "0". I want to show all rows that have any value other than "0" in a selected range. Can you help me please? -- Thank you! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doug,
Try this. Select a range and then run the code Sub Hide_Me() For Each c In Selection If c.Value < "" And c.Value = 0 Then c.EntireRow.Hidden = True End If Next End Sub Mike "Doug" wrote: What is a good macro to hide rows in a table selected range that have "0" values? Reason for wanting this if I filter any one column for values of "0" then it is likely to hide values in other columns that are not "0". I want to show all rows that have any value other than "0" in a selected range. Can you help me please? -- Thank you! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think this is hiding a row if it has a single "0" value. I am needing it to
hide it if they are all "0" values. When I tried it, ran for about 1 minute and timed out after hiding about 40 rows at the top of my table. -- Thank you! "Mike H" wrote: Doug, Try this. Select a range and then run the code Sub Hide_Me() For Each c In Selection If c.Value < "" And c.Value = 0 Then c.EntireRow.Hidden = True End If Next End Sub Mike "Doug" wrote: What is a good macro to hide rows in a table selected range that have "0" values? Reason for wanting this if I filter any one column for values of "0" then it is likely to hide values in other columns that are not "0". I want to show all rows that have any value other than "0" in a selected range. Can you help me please? -- Thank you! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about, instead of code, add a column with formula that resolves to True
if your condition is met, then just apply a filter? e.g. new column A, with formula in A2 "=or(b2<0,c2<0,d2<0,e2<0)" with arguments for as many cells to the right need to be tested for 0 value. "Doug" wrote: What is a good macro to hide rows in a table selected range that have "0" values? Reason for wanting this if I filter any one column for values of "0" then it is likely to hide values in other columns that are not "0". I want to show all rows that have any value other than "0" in a selected range. Can you help me please? -- Thank you! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you
-- Thank you! "B Lynn B" wrote: How about, instead of code, add a column with formula that resolves to True if your condition is met, then just apply a filter? e.g. new column A, with formula in A2 "=or(b2<0,c2<0,d2<0,e2<0)" with arguments for as many cells to the right need to be tested for 0 value. "Doug" wrote: What is a good macro to hide rows in a table selected range that have "0" values? Reason for wanting this if I filter any one column for values of "0" then it is likely to hide values in other columns that are not "0". I want to show all rows that have any value other than "0" in a selected range. Can you help me please? -- Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro code to hide rows and not calculate hidden rows | Excel Discussion (Misc queries) | |||
Macro to hide rows | Excel Discussion (Misc queries) | |||
Macro to hide rows? | Excel Programming | |||
Hide rows with macro | Excel Programming | |||
Macro to hide rows | Excel Programming |