Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 06-19-2015, 10:37 AM
charlesdh charlesdh is offline Hide rows in multiple columns based on zero values Windows 7 32bit Hide rows in multiple columns based on zero values Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

HI,

Are you really looking for "0"? The word doc does not show "0".
Now you have a column for "Budget Sheet Total" is this a sum for each roll?.


If so you can key in on it and then hide the rows.
As mentioned before it may have saved a lot of time if you posted a copy of your file.
Reply With Quote
  #17  
Old 06-21-2015, 11:36 PM
Deane Deane is offline Hide rows in multiple columns based on zero values Windows 7 64bit Hide rows in multiple columns based on zero values Office 2010 64bit
Novice
Hide rows in multiple columns based on zero values
 
Join Date: Jun 2015
Posts: 8
Deane is on a distinguished road
Default

The excel file exceeds the limit of this forum..

Thats why I havent posted it?

To give you a bit of background on the sheet. The sheet pulls new data every month and certain rows are always blank so in order to only show rows with values and therefore make the sheet more compact I need to hide zeros. The word doc does show zeros as '-'. No the budget sheet total is not the sum of the previous columns.

But I see what you mean.. maybe if I make a column that sums all of the columns I can just use the code on that column only? could you provide a code for this? say in column T.

Really appreciate the help thus far.
Reply With Quote
  #18  
Old 06-22-2015, 09:59 AM
charlesdh charlesdh is offline Hide rows in multiple columns based on zero values Windows 7 32bit Hide rows in multiple columns based on zero values Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

HI,

I'll see what I can do. But, can you try to zip the file?
Reply With Quote
  #19  
Old 06-23-2015, 12:41 PM
charlesdh charlesdh is offline Hide rows in multiple columns based on zero values Windows 7 32bit Hide rows in multiple columns based on zero values Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

HI,

Here's a code that may work. You will need to make change to it to reflect you ranges.

Code:
Sub Hide_0()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim r As Range, x, c As Range
Dim r1 As Range
Dim n As Long, n1 As Long
Dim lrow As Long
Application.ScreenUpdating = False
ActiveSheet.Rows.Hidden = False
lrow = Range("ao65536").End(xlUp).Row
Set x = Range("AO5:AO" & lrow)
x.EntireRow.Hidden = True

For Each c In x
Set r = Range("AO" & c.Row & ":As" & c.Row)
Set r1 = Range("AU" & c.Row & ":AZ" & c.Row)
    n = Application.Sum(r)
    n1 = Application.Sum(r1)
    If n <> "0" And n1 <> "0" Then
        c.EntireRow.Hidden = False
    End If
Next c
End Sub
Reply With Quote
  #20  
Old 06-23-2015, 11:24 PM
Deane Deane is offline Hide rows in multiple columns based on zero values Windows 7 64bit Hide rows in multiple columns based on zero values Office 2010 64bit
Novice
Hide rows in multiple columns based on zero values
 
Join Date: Jun 2015
Posts: 8
Deane is on a distinguished road
Default

Thx Charles! I finally have it working.

Thx for all the help!
Reply With Quote
Reply

Tags
hide, rows and columns, zero values



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code to Hide columns based on selection on prior sheet Silver1379 Excel Programming 0 04-15-2015 08:40 AM
Hide rows in multiple columns based on zero values I need to add multiple values based on multiple criteria in a cell not sure what to do AUHAMM Excel 3 10-27-2014 09:11 PM
Hide rows in multiple columns based on zero values Insert values from multiple rows based on value in one column pachmarhi Excel 3 07-18-2014 09:57 PM
Hide rows in multiple columns based on zero values Hide Rows and Update Chart based on cell value ubns Excel Programming 5 05-07-2012 05:44 AM
Conditional Formatting to Hide Rows or Columns? sczegus Excel 0 09-26-2006 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft