Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide rows with zero balance
i have, lets say
a b c d 1 1 4 5 9 2 8 0 8 7 3 0 0 0 0 4 7 8 5 9 5 0 0 0 0 6 5 8 7 4 how can i hide rows where column a,b,c and d have zero balances In this case, hiding row 3 and 5 Any help would be greatly appreciated |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide rows with zero balance
On 23 Jul, 17:24, andresg1975
wrote: i have, lets say a b c d 1 1 4 5 9 2 8 0 8 7 3 0 0 0 0 4 7 8 5 9 5 0 0 0 0 6 5 8 7 4 how can i hide rows where column a,b,c and d have zero balances In this case, hiding row 3 and 5 Any help would be greatly appreciated Try this for where your data is in cells B1 to E7: Dim rngHide As Range For Each rngHide In Range("A2:A7") If WorksheetFunction.Sum(rngHide.Offset(0, 1).Resize(1, 5)) = 0 Then rngHide.EntireRow.Hidden = True End If Next rngHide Regards, Toyin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide rows with zero balance
It didn't work due to a syntax error in he
If WorksheetFunction.Sum(rngHide.Offset(0, 1).Resize(1, 5)) = 0 " wrote: On 23 Jul, 17:24, andresg1975 wrote: i have, lets say a b c d 1 1 4 5 9 2 8 0 8 7 3 0 0 0 0 4 7 8 5 9 5 0 0 0 0 6 5 8 7 4 how can i hide rows where column a,b,c and d have zero balances In this case, hiding row 3 and 5 Any help would be greatly appreciated Try this for where your data is in cells B1 to E7: Dim rngHide As Range For Each rngHide In Range("A2:A7") If WorksheetFunction.Sum(rngHide.Offset(0, 1).Resize(1, 5)) = 0 Then rngHide.EntireRow.Hidden = True End If Next rngHide Regards, Toyin |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide rows with zero balance
Thanks a lot for your help!
" wrote: The syntax is due to you not having "Then" after the 0 For some reason the text has wrapped to the next line in my reply. Let me know, Toyin. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I automatically hide or suppress zero balance rows | Excel Worksheet Functions | |||
How do I Add rows to a Balance sheet | Excel Discussion (Misc queries) | |||
Insert Rows in Balance Sheet Template | New Users to Excel | |||
How do i keep a running balance without adding rows each time? | Excel Worksheet Functions | |||
How to hide values in a running balance untill new data is entere. | Excel Discussion (Misc queries) |