Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-13-2015, 05:26 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

Hhi,

With this code you should not get a "Mismatch". You may need to change the columns that you are looking at.

Code:
Sub Hide_rows()
Dim LastRow As Long
Dim Rng As Range
LastRow = Range("A65536").End(xlUp).Row '
Set Rng = Range("A2:P" & LastRow) 'change "P" to your last coulum
Application.ScreenUpdating = False
    For Each cell In Rng
        If cell.Value = "0" Then
            cell.EntireRow.Hidden = True
        End If
    Next cell
Application.ScreenUpdating = True
End Sub
Reply With Quote
 

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 12:33 PM.


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