Hi All,
Been a long time since here,
anyway I picked up on the following code that hides empty columns, I would like to know if there is a way to do this with rows.
Thanks
Lee
[vba]Sub Button1_Click()
Dim Col_Ct As Integer, i As Integer
Col_Ct = Cells(1, Columns.Count).End(xlToLeft).Column
For i = 1 To Col_Ct
If WorksheetFunction.CountA(Range(Cells(1, i).Address, Cells(Rows.Count, i).Address)) < 2 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next i
End Sub[/vba]
maybe so
[VBA]Sub Button2_Click()
Dim rws As Long, i As Long, Col_Ct As Long
rws = Cells(Rows.Count, 1).End(xlUp).Row
Col_Ct = Columns.Count
For i = 1 To rws
Cells(i, 1).EntireRow.Hidden = WorksheetFunction.CountA(Range(Cells(i, 1), Cells(i, Col_Ct))) < 2
Next i
End Sub[/VBA]
Hi Nilem,
Thanks for the response, I have attached the worksheet that I am trying to hide the rows, I would need to hide rows 189 to 292, although for each invoice there would be varying length's.
Thanks
Lee