![]() |
#6
|
|||
|
|||
![]()
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 |
Tags |
hide, rows and columns, zero values |
|
![]() |
||||
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 |
![]() |
AUHAMM | Excel | 3 | 10-27-2014 09:11 PM |
![]() |
pachmarhi | Excel | 3 | 07-18-2014 09:57 PM |
![]() |
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 |