View Single Post
  #7   Report Post  
Bob Phillips
 
Posts: n/a
Default

The OP was testing the same range every row.

--
HTH

Bob Phillips

"JE McGimpsey" wrote in message
...
I think that should do the same thing as the OP's routine. If the OP
isn't seeing any rows hidden, it's likely that he has either formula or
non-printing text (e.g, space characters) in the target rows, which
COUNTA() will see as non-blank.



In article ,
"Don Guillett" wrote:

Using that method, try it this way
Sub Hide_Print_Unhide()
Dim rw As Long
Application.ScreenUpdating = False

With Sheets("Sheet1")
For rw = 1 To 300
If Application.CountA(Range(.Cells(rw, 1), .Cells(rw, 8))) =

0
Then _
.Rows(rw).Hidden = True
Next rw
.PrintOut
.Range("A1:A300").EntireRow.Hidden = False
End With

Application.ScreenUpdating = True
End Sub