Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Blank rows at Bottom, over 60,000 of them - how to remove ???

I already searched this and found several macros, but they do not
work.

Normally when you have a lot of rows of data - you can click the
scrollbar button and drag down to the bottom to see that last row of
data.

I have a worksheet with data only in Rows 1 to 2500. But when I click
on the scroll button and drag down, it quickly passes the last row of
data and scrolls down way past it - to row 64187. I have deleted all
the blank rows below row 2500, and they still shows up as far as the
scroll button goes.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Blank rows at Bottom, over 60,000 of them - how to remove ???

This routine will search for the first empty row and delete this row and all
rows below it. It appears to set Activesheet.Usedrange correctly and may fix
your scroll problem:

Sub gsnu()
Dim j As Long
Dim i As Long
Dim rr As Range
Dim s As String

Set rr = ActiveSheet.UsedRange

j = rr.Rows.Count + rr.Row

For i = 1 To j
If Application.CountA(Rows(i)) = 0 Then
s = i & ":65536"
Rows(s).Delete Shift:=xlUp
Exit Sub
End If
Next i
End Sub
--
Gary's Student


"Kevin" wrote:

I already searched this and found several macros, but they do not
work.

Normally when you have a lot of rows of data - you can click the
scrollbar button and drag down to the bottom to see that last row of
data.

I have a worksheet with data only in Rows 1 to 2500. But when I click
on the scroll button and drag down, it quickly passes the last row of
data and scrolls down way past it - to row 64187. I have deleted all
the blank rows below row 2500, and they still shows up as far as the
scroll button goes.

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Blank rows at Bottom, over 60,000 of them - how to remove ???

On Wed, 20 Sep 2006 07:43:04 -0700, Gary''s Student
wrote:

This routine will search for the first empty row and delete this row and all
rows below it. It appears to set Activesheet.Usedrange correctly and may fix
your scroll problem:

Sub gsnu()
Dim j As Long
Dim i As Long
Dim rr As Range
Dim s As String

Set rr = ActiveSheet.UsedRange

j = rr.Rows.Count + rr.Row

For i = 1 To j
If Application.CountA(Rows(i)) = 0 Then
s = i & ":65536"
Rows(s).Delete Shift:=xlUp
Exit Sub
End If
Next i
End Sub


I tried it buy luck. I think that sub just deletes blank rows, and I
have tried a few of those including this one now. But it does not
change the way Excel scolls.

I can always scroll all the way to row 65536 using the down arrow.
But the scroll button should only drag the view down to the end of the
data. In this case it drags way past row 2500 which is where my data
ends, and all the way to row 64187.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Blank rows at Bottom, over 60,000 of them - how to remove ???

http://www.contextures.com/xlfaqApp.html#Unused

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
On Wed, 20 Sep 2006 07:43:04 -0700, Gary''s Student
wrote:

This routine will search for the first empty row and delete this row and
all
rows below it. It appears to set Activesheet.Usedrange correctly and may
fix
your scroll problem:

Sub gsnu()
Dim j As Long
Dim i As Long
Dim rr As Range
Dim s As String

Set rr = ActiveSheet.UsedRange

j = rr.Rows.Count + rr.Row

For i = 1 To j
If Application.CountA(Rows(i)) = 0 Then
s = i & ":65536"
Rows(s).Delete Shift:=xlUp
Exit Sub
End If
Next i
End Sub


I tried it buy luck. I think that sub just deletes blank rows, and I
have tried a few of those including this one now. But it does not
change the way Excel scolls.

I can always scroll all the way to row 65536 using the down arrow.
But the scroll button should only drag the view down to the end of the
data. In this case it drags way past row 2500 which is where my data
ends, and all the way to row 64187.



  #5   Report Post  
Posted to microsoft.public.excel.programming
jmb jmb is offline
external usenet poster
 
Posts: 3
Default Blank rows at Bottom, over 60,000 of them - how to remove ???

when i have your problem, it is always with a range, formula or a
conditionnal format linked to theses rows
When i correct the error. i close and reopen my workbook and solve
this problem.

jmb

Kevin a écrit :

I already searched this and found several macros, but they do not
work.

Normally when you have a lot of rows of data - you can click the
scrollbar button and drag down to the bottom to see that last row of
data.

I have a worksheet with data only in Rows 1 to 2500. But when I click
on the scroll button and drag down, it quickly passes the last row of
data and scrolls down way past it - to row 64187. I have deleted all
the blank rows below row 2500, and they still shows up as far as the
scroll button goes.

Any ideas?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove excess (unwanted) rows from the bottom of a speadsheet [email protected] Excel Discussion (Misc queries) 3 November 26th 09 06:29 PM
Remove Blank and Non Data Rows UT Excel Discussion (Misc queries) 3 June 12th 07 10:01 PM
Need macro to remove blank rows Bob Excel Programming 7 June 21st 06 01:21 PM
How do I delete blank rows at the bottom of a spreadsheet to get . Miklaurie Excel Discussion (Misc queries) 1 January 26th 05 02:30 PM
Remove blank rows from combobox Steph[_3_] Excel Programming 1 June 25th 04 05:37 PM


All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"