View Single Post
  #4   Report Post  
Nick Hodge
 
Posts: n/a
Default

The code below finds the last row used in column A and then hides all the
rows in between that have nothing in column A. You should be able to work it
out from there to suit your actual need

Sub HideBlankRows()
Dim lLastRow As Long
lLastRow = Range("A65536").End(xlUp).Row
Range("A1:A" & lLastRow).SpecialCells(xlCellTypeBlanks).EntireRow .Hidden =
True
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

"tamato43" wrote in message
...
Do you know of a VBA format then?

"Huw Davies" wrote:

I don't think you can use conditional format to automatically hide rows
that
are blank. It's either do it by eye using the "hide" option under Format
|
Row menu, or by using VBA.

Huw.

"tamato43" wrote:

Hello All,

Does anyone know how to set a conditional format to hide a colum and/or
row
if they are left blank?

Example:

I have a spreadsheet that imports info from another worksheet or file
into
10 rows.
In some cases I only populate rows 1 through 5 leaving 6 through 10
blank,
So I'd like to hide those rows.

Please help.