Hey for finding the last row which has the data you can use th
following.
lastrw = Cells(Rows.Count, "B").End(xlUp).Row
It checks in the column "B" for data and gives the last row.
Based on this, you can use the following for hiding the rows
Sheets("Sheet1").Rows("lastrw:65536").Hidden = True
Hope this helps.
Samee
--
Message posted from
http://www.ExcelForum.com