Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding Rows if a Field Value is set to 0%
Hello,
I have a worksheet with some rows that are only applicable if the percentage value in another field is greater than 0%. Otherwise, I want those rows to be hidden. Can anyone help me figure out how to do this? Thanks very much! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding Rows if a Field Value is set to 0%
Use Autofilter on the column that contains the percentage - choose
Custom, then Not Equal To, then 0 (zero). Hope this helps. Pete On Sep 1, 8:58*pm, George wrote: Hello, I have a worksheet with some rows that are only applicable if the percentage value in another field is greater than 0%. Otherwise, I want those rows to be hidden. Can anyone help me figure out how to do this? Thanks very much! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding Rows if a Field Value is set to 0%
Thanks but I don't think that will work for me.
I have a field (D1) where the user can enter a percentage. That value drives formulas on 16 other fields (4Rx4C) which are always 0 if the field value is 0% (the default value). Therefore, they should remain hidden. BUT, if the user enters anything other than 0%, I want 16 other fields to appear. "Pete_UK" wrote: Use Autofilter on the column that contains the percentage - choose Custom, then Not Equal To, then 0 (zero). Hope this helps. Pete On Sep 1, 8:58 pm, George wrote: Hello, I have a worksheet with some rows that are only applicable if the percentage value in another field is greater than 0%. Otherwise, I want those rows to be hidden. Can anyone help me figure out how to do this? Thanks very much! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding Rows if a Field Value is set to 0%
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("D1")) Is Nothing Then Exit Sub On Error GoTo CleanUp Application.EnableEvents = False With Target If .Value = 0 Then Rows("6:9").Hidden = True Else Rows("6:9").Hidden = False End If End With CleanUp: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Mon, 1 Sep 2008 13:39:02 -0700, George wrote: Thanks but I don't think that will work for me. I have a field (D1) where the user can enter a percentage. That value drives formulas on 16 other fields (4Rx4C) which are always 0 if the field value is 0% (the default value). Therefore, they should remain hidden. BUT, if the user enters anything other than 0%, I want 16 other fields to appear. "Pete_UK" wrote: Use Autofilter on the column that contains the percentage - choose Custom, then Not Equal To, then 0 (zero). Hope this helps. Pete On Sep 1, 8:58 pm, George wrote: Hello, I have a worksheet with some rows that are only applicable if the percentage value in another field is greater than 0%. Otherwise, I want those rows to be hidden. Can anyone help me figure out how to do this? Thanks very much! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hiding Rows if a Field Value is set to 0%
Thanks! That did it.
"Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("D1")) Is Nothing Then Exit Sub On Error GoTo CleanUp Application.EnableEvents = False With Target If .Value = 0 Then Rows("6:9").Hidden = True Else Rows("6:9").Hidden = False End If End With CleanUp: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Mon, 1 Sep 2008 13:39:02 -0700, George wrote: Thanks but I don't think that will work for me. I have a field (D1) where the user can enter a percentage. That value drives formulas on 16 other fields (4Rx4C) which are always 0 if the field value is 0% (the default value). Therefore, they should remain hidden. BUT, if the user enters anything other than 0%, I want 16 other fields to appear. "Pete_UK" wrote: Use Autofilter on the column that contains the percentage - choose Custom, then Not Equal To, then 0 (zero). Hope this helps. Pete On Sep 1, 8:58 pm, George wrote: Hello, I have a worksheet with some rows that are only applicable if the percentage value in another field is greater than 0%. Otherwise, I want those rows to be hidden. Can anyone help me figure out how to do this? Thanks very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
Hiding Specific Rows Based on Values in Other Rows | Excel Worksheet Functions | |||
Hiding a button when hiding rows | Excel Discussion (Misc queries) | |||
Q: Hiding a field button on a pivot chart | Excel Discussion (Misc queries) | |||
Pivot Charts, hiding field values in second level filters? | Charts and Charting in Excel |