#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Stop Loop

It is an inbuilt count of the number of rows in the spreadsheet.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"pjd33" wrote in message
...
That works, I'm sure it wasn't the hardest question you have ever had to
answer but I appreciated it - thanks very much for the quick response.

Could you explain what the = rows.count does?

"Tom Ogilvy" wrote:

Do Until ActiveCell.End(xldown).Row = rows.count
Range(Selection, Selection.End(xlDown)).Select
Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay,
_
Trend:=True
Selection.End(xlDown).Select
Loop

--
Regards,
Tom Ogilvy


"pjd33" wrote:

I have the following code.

Do Until ActiveCell.Value = "End"
Range(Selection, Selection.End(xlDown)).Select
Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear,
Date:=xlDay, _
Trend:=True
Selection.End(xlDown).Select
Loop

How do I make the loop stop when the selection doesn't find any more
data?
At the moment it just goes to the bottom row of the workbook and fails.

I've kind of guessed how to make the loop happen in the first place and
I'm
not that great (understatement) at VBA so help in simple terms would be
appreciated!

Many thanks



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
Do Loop doesn't stop [email protected][_2_] Excel Programming 5 May 22nd 07 07:32 PM
Stop Loop Robert[_30_] Excel Programming 2 January 17th 07 01:34 PM
Hot key to stop a LOOP joopdog[_3_] Excel Programming 5 February 9th 06 06:51 PM
how to stop a loop L775 Excel Programming 6 November 29th 04 08:37 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 03:50 PM.

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

About Us

"It's about Microsoft Excel"