Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2015, 12:35 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,

Welcome to the forum.

I did some research and found these codes that may help you.

Code:
Sub Hide0()
Dim r As Range, x, c As Range

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
    
Set r = Range("A1:AZ9000")'' this set the range from column A to AZ'
                                          '' it should look at each row in the column and hide the "0"'''''
Application.ScreenUpdating = False
ActiveSheet.Rows.Hidden = False
r.EntireRow.Hidden = True
For Each c In r
    If c <> 0 Then
        c.EntireRow.Hidden = False
    End If
Next c
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

End Sub
Code:
Sub Unhide()
'''' this should unhide the rows.
Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False
Application.ScreenUpdating = True

End Sub
Reply With Quote
  #2  
Old 06-11-2015, 08:41 AM
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

Thanks for this!

I am however getting a type mismatch error when running the macro? It then hides all rows.
Do you know why this could be?
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 02:59 AM.


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