View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JForsyth JForsyth is offline
external usenet poster
 
Posts: 4
Default Macro to HIDE blank rows

Thanks for writing back! Unfortunately it's not working...when I run it, the
rows don't become hidden...any suggestions?

"Jacob Skaria" wrote:

Try the below

Sub Hideemptyrows()
For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _
Then Rows(lngRow).Hidden = True
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"JForsyth" wrote:

I have seen a couple of threads on how to create a macro to DELETE blank rows
but this is not what I'm looking for. I need to be able to simply HIDE the
blank rows. Does anyone know how to do this?