ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   reset end of wksheet (https://www.excelbanter.com/excel-programming/409252-reset-end-wksheet.html)

[email protected]

reset end of wksheet
 
Is it possible to remove rows beyond 200 from a worksheet. If I can
then the rest of my problem goes away. Have tried quite a few ideas no
luck so far. My idea is a macro that will do this and run it befor I
proceed.

David McRitchie

reset end of wksheet
 
Depends on what you mean. The rows and columns past
the End cell (Ctrl+End) will still be accounted for but
will not print, and will be past scroller unless you move
scroller past that point.

To correct a bad End location setting see

"Why do my scrollbars go to row 500 -- my data ends in cell E50?" [-- http://www.contextures.com/xlfaqApp.html#Unused --],
contextures.com, Debra Dalgleish. The basis of deletions is all columns without content, and all rows without content. Warning:
merged cells problems -- a merged cell has content only in the upper left cell of a merged cell group. You could clip off unused
parts of merged cells and cells formatted as merged as in a form. It is important that you format entire columns because formatting
in partially formatted columns will be lost from the deletion points.

KB 244435 - How to reset the last cell in Excel [-- http://support.microsoft.com/?id=244435 --] [ref [--
http://groups.google.com/groups?thre...GP10.phx .gbl --]], Microsoft KB article, Microsoft Excel keeps
track of all the cells that you use in a worksheet by using an active cell table (also named a "dependency" table). Sometimes, the
last cell in this table may refer to a cell that is outside the worksheet area that you are using. I doubt that formatting an
entire worksheet at once is the problem. There is an addin that you have to agree to a licensing agreement, that probably does the
same as macros you find in the MS KB, on websites, and newsgroups.

--
HTH,
David McRitchie, Microsoft MVP -- Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


wrote in message ...
Is it possible to remove rows beyond 200 from a worksheet. If I can
then the rest of my problem goes away. Have tried quite a few ideas no
luck so far. My idea is a macro that will do this and run it befor I
proceed.



joel

reset end of wksheet
 
LastRow = rows.count 'last row may be different in diferent versions of excel
rows("200:" & LastRow).delete

" wrote:

Is it possible to remove rows beyond 200 from a worksheet. If I can
then the rest of my problem goes away. Have tried quite a few ideas no
luck so far. My idea is a macro that will do this and run it befor I
proceed.


Dana DeLouis

reset end of wksheet
 
Would this idea work? This just does Rows 1:10

Private Sub Worksheet_Activate()
Const LastGoodRow = 10
Range(Cells(LastGoodRow + 1, 1), Cells(Rows.Count, 1)).EntireRow.Hidden
= True
ActiveSheet.ScrollArea = Rows(1).Resize(LastGoodRow).Address
End Sub

- -
HTH
Dana DeLouis


wrote in message
...
Is it possible to remove rows beyond 200 from a worksheet. If I can
then the rest of my problem goes away. Have tried quite a few ideas no
luck so far. My idea is a macro that will do this and run it befor I
proceed.




All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com