ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   breaking out of a loop (https://www.excelbanter.com/excel-programming/285579-breaking-out-loop.html)

ChuckM[_2_]

breaking out of a loop
 
how do I break out of a loop. As I loop down a column I'd like to
break out of the loop when I find data that meets a particular
condition.
thanks
chuck

George Nicholson[_2_]

breaking out of a loop
 
Chuck:
If using Do...Loop: Exit Do
If using For...Next: Exit For
They will take you to the 1st line of code following Loop or Next.
--
George Nicholson

Remove 'Junk' from return address.


"ChuckM" wrote in message
m...
how do I break out of a loop. As I loop down a column I'd like to
break out of the loop when I find data that meets a particular
condition.
thanks
chuck





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

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