+ Reply to Thread
Results 1 to 2 of 2

Do-While loop continues unexpectedly

  1. #1
    Forum Contributor
    Join Date
    02-09-2011
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    161

    Do-While loop continues unexpectedly

    Hi Forum,

    I have set up a very simple Do-While loop to test how it works before using it in my actual application.

    It works exactly how I want it to but I am not sure why? I expected the loop to stop when it encountered the first empty cell in column A (cell A22) but it keeps going all the way to the very last value in column A (cell A20066) even though there are many empty cells within the range.

    This is actually exactly what I need it do. I am just trying to get an understanding of how it works and why it doesn't stop when reaching cell A22.

    Please Login or Register  to view this content.
    I tried to attach the spreadsheet I have been using to test the simple loop but it was too big.

    Thanks very much

    Dave
    Last edited by Motox; 03-01-2012 at 10:14 PM.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Do-While loop continues unexpectedly

    try this.

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1