Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As written:
Sheets("Sheet1").Rows("lastrw:65536").Hidden = True will just give you an error unless you have a defined name "lastrw" -- Regards, Tom Ogilvy "sameerce " wrote in message ... Hey for finding the last row which has the data you can use the 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. Sameer --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide unused rows and columns | Excel Discussion (Misc queries) | |||
Hide columns but not the top rows | Excel Discussion (Misc queries) | |||
Hide columns and rows | Excel Worksheet Functions | |||
Hide / Unhide columns and rows | Excel Discussion (Misc queries) | |||
Hide rows or columns using + - buttons | Excel Discussion (Misc queries) |