#1
|
|||
|
|||
Hide rows in multiple columns based on zero values
Hi there I have used the code belowto hide rows based on zero values but it only considers the 3rd column. How do i get the code to consider a range of columns and only hide the row if there are zeros values in the entire range not just column 3?
Code I used: Sub HURows() BeginRow = 1 EndRow = 200 ChkCol = 3 For RowCnt = BeginRow To EndRow If Cells(RowCnt, ChkCol).Value = 0 Then Cells(RowCnt, ChkCol).EntireRow.Hidden = True Else Cells(RowCnt, ChkCol).EntireRow.Hidden = False End If Next RowCnt End Sub |
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 |
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 |
Insert values from multiple rows based on value in one column | pachmarhi | Excel | 3 | 07-18-2014 09:57 PM |
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 |