Add rows after hiding rows

  • Thread starter Thread starter eshoobee1
  • Start date Start date
E

eshoobee1

I have a project that hides a row in the print area when a specified column
in that row equals zero. The number of hidden rows varies depending on user
input. I need a way to add the same number of blank rows at the end of the
list of printed rows so that the size of my print area does not change. An
suggestions?
 
hi
since you didn't post any code, i can only guess and assume that your
project is code and that you are going down a list in a loop to hide the zero
rows.

dim c as long
c=c+1 'add this just after the line that hides the zero row

you could add a counter to count the number of rows that are hidden.
then after your loop, you can add the count of hidden rows back in.
Range("A1").End(xlDown).Offset(1, 0).Select 'go to end of data
For i = 1 To c
ActiveCell.EntireRow.Insert shift:=xlDown
Next i

my thoughts
Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top