LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel loops and If blocks


I haven't looked at what your code is trying to do but a quick tidy u
suggests that this might be easier to read.

Do Until ActiveCell = "Stop"

ActiveWorkbook.Names.Add Name:="Count1", RefersToR1C1:=ActiveCell
Selection.End(xlDown).Select
ActiveWorkbook.Names.Add Name:="Count2", RefersToR1C1:=ActiveCell

ActiveCell.Offset(0, 1).Select
ActiveWorkbook.Names.Add Name:="Starters"
RefersToR1C1:=ActiveCell
ActiveCell.FormulaR1C1 = "=COUNTA(Count1:Count2)"

If Range("Starters") <= "7" Then SixRunners
If Range("Starters") <= "8" Then SevenRunners
If Range("Starters") = "15" Then SixteenRunners


Range("Starters").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

ActiveCell.Offset(2, -1).Select

Loop
Range("A2").Select

End Su

--
tony
-----------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=54443



 
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
How do I sort blocks of information in Excel? so_lisa Excel Discussion (Misc queries) 2 May 15th 23 03:46 AM
Excel 2002: How to sum up in blocks ? Mr. Low Excel Discussion (Misc queries) 6 April 23rd 08 04:27 PM
Using excel to insert autocad blocks? LAC Excel Programming 0 November 29th 05 11:36 PM
print in blocks in excel david Excel Discussion (Misc queries) 1 May 3rd 05 09:46 PM
Moving blocks of data in excel Yasmin Excel Discussion (Misc queries) 1 March 17th 05 10:39 PM


All times are GMT +1. The time now is 11:27 AM.

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"