Hi Excel Gurus,
Once again I am very much thankful to this community due to which I learned a lot. I am stuck in the current routine although it is not giving any error and executing but its not hiding the rows as mentioned which are blank has no data. To be more precise I have selected the sheets for which I want to apply the hidden routine to.
Kindly help
Code I am using is below for reference ;
best regards
Beloshi
Once again I am very much thankful to this community due to which I learned a lot. I am stuck in the current routine although it is not giving any error and executing but its not hiding the rows as mentioned which are blank has no data. To be more precise I have selected the sheets for which I want to apply the hidden routine to.
Kindly help
Code I am using is below for reference ;
Code:
Sub Position()
Dim iLastRow As Integer
Dim ws As Worksheet
On Error Resume Next
For Each ws In Worksheets
Application.Goto Reference:=ws.Range("A1"), Scroll:=True
'Hide blank rows
If ws.Name = "DQ % Stores " Or ws.Name = "DQ # Stores" Or ws.Name = "DQ % New Reg Stores" _
Or ws.Name = "DQ # New Reg Stores" Or ws.Name = "DQ % Stores per Branch" _
Or ws.Name = "DQ # Stores per Branch" Or ws.Name = "DQ % Stores Branch New Reg" _
Or ws.Name = "DQ # Stores Branch New Reg" Then
iLastRow = ws.Cells(129, 2).End(xlUp).Row
For i = iLastRow + 1 To 129
ws.Rows(i).Hidden
Next
End If
Next
On Error GoTo 0
End Sub
best regards
Beloshi
Last edited: