Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
How do I stop iteration when it reaches the end of a group of occupied cells
filled with the same text (i.e. B277) in a column? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
Hi
exit for -- Regards Frank Kabel Frankfurt, Germany "L775" schrieb im Newsbeitrag ... How do I stop iteration when it reaches the end of a group of occupied cells filled with the same text (i.e. B277) in a column? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
I want it to stop at the end of the list. who does it know that the next cell is empty so it will not error or use an empty cell. the length of the list in a column or number of rows varies for different groups that the routine or loop neet to operate on. thank you for your help. I know there is a way of doing. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
To have the programming work similar to doubleclick on the fill handle
so that it copies down until the next cell is empty requires a Tom Ogilvy solution. http://google.com/groups?threadm=eZv...GP15.phx.g bl The macro equivalent ( SUB ) to double-click. Dim rng as Range set rng = Range(cells(2,1),cells(2,1).End(xldown)) rng.offset(0,1).Formula = Cells(2,2).Formula --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "L775" wrote in message ... I want it to stop at the end of the list. who does it know that the next cell is empty so it will not error or use an empty cell. the length of the list in a column or number of rows varies for different groups that the routine or loop neet to operate on. thank you for your help. I know there is a way of doing. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
Hi,
how about do until activecell.offset (0,1).value ="" 'code activecell.offset(1,0).select Loop Steve "David McRitchie" wrote in message ... To have the programming work similar to doubleclick on the fill handle so that it copies down until the next cell is empty requires a Tom Ogilvy solution. http://google.com/groups?threadm=eZv...GP15.phx.g bl The macro equivalent ( SUB ) to double-click. Dim rng as Range set rng = Range(cells(2,1),cells(2,1).End(xldown)) rng.offset(0,1).Formula = Cells(2,2).Formula --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "L775" wrote in message ... I want it to stop at the end of the list. who does it know that the next cell is empty so it will not error or use an empty cell. the length of the list in a column or number of rows varies for different groups that the routine or loop neet to operate on. thank you for your help. I know there is a way of doing. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
Wouldn't work same. A formula could be returning a null value,
Tom's code has no loop, much faster, and works same as the worksheet function would for a selection from Column A. Other columns would check the column to the left instead of to the right. BTW, changing the activecell is not a good practice within a macro except upon exiting and only if that was the purpose of the macro. However there are many ways to solve a problem and knowing your data is always important. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Steve Smallman" wrote in message ... Hi, how about do until activecell.offset (0,1).value ="" 'code activecell.offset(1,0).select Loop Steve "David McRitchie" wrote in message ... To have the programming work similar to doubleclick on the fill handle so that it copies down until the next cell is empty requires a Tom Ogilvy solution. http://google.com/groups?threadm=eZv...GP15.phx.g bl The macro equivalent ( SUB ) to double-click. Dim rng as Range set rng = Range(cells(2,1),cells(2,1).End(xldown)) rng.offset(0,1).Formula = Cells(2,2).Formula --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "L775" wrote in message ... I want it to stop at the end of the list. who does it know that the next cell is empty so it will not error or use an empty cell. the length of the list in a column or number of rows varies for different groups that the routine or loop neet to operate on. thank you for your help. I know there is a way of doing. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to stop a loop
Hi L775,
At the top of the loop: Do until activecell.value = "" You did a post on 11/25/04 where you indicated that you might be interested in a programmer to do freelance projects. Are you still interested? . Thanks "L775" wrote: I want it to stop at the end of the list. who does it know that the next cell is empty so it will not error or use an empty cell. the length of the list in a column or number of rows varies for different groups that the routine or loop neet to operate on. thank you for your help. I know there is a way of doing. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop a loop when certain data is found | Excel Discussion (Misc queries) | |||
How do I stop other circles in other cells to stop selecting? | Excel Worksheet Functions | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming | |||
Stop a loop with a keyboard | Excel Programming | |||
newbie: stop a FOR NEXT loop | Excel Programming |