Hidden Range

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hello All,

I have a large work sheet with multiple hidden rows. Is
there a simple way to identify the last row of data
(usually hidden) and select the a cell in the following
row.

I can do this by unhiding everything finding the end of
the data (xlDown), identifing the last row then looping
to hide all the appropriate data. I know there must be
something easier.

thanks
 
Dim cell as Range
set cell = Cells(rows.count,1).End(xlup)

' cell is the last visible cell with a value. Now loop down
set cell = cell.offset(1,0)
do while cell.EntireRow.Hidden = False
set cell = cell.offset(1,0)
Loop
 

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