Hi,
I am trying to hide in two columns the cells with zero values using vba but I like to keep the empty rows.
Thank you constantinos
Hi,
I am trying to hide in two columns the cells with zero values using vba but I like to keep the empty rows.
Thank you constantinos
Hi ckozakos,
Use the following code:-
Regards,![]()
Sub hide() i = Cells.SpecialCells(xlCellTypeLastCell).Row Range("a1").Select 'change this with your first column For a = 1 To i If ActiveCell.Value = 0 And ActiveCell.Value <> "" Then If ActiveCell.Offset(0, 1).Value = 0 And ActiveCell.Offset(0, 1).Value <> "" Then Selection.EntireRow.Hidden = True Selection.Offset(1, 0).Select End If Selection.Offset(1, 0).Select Else Selection.Offset(1, 0).Select End If Next End Sub
DILIPandey
<click on below 'star' if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks