+ Reply to Thread
Results 1 to 5 of 5

Why won't my Do while run?

  1. #1
    Registered User
    Join Date
    02-28-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Why won't my Do while run?

    i'm trying to create a macro that transfers a set of data from one sheet to another on the condition that the first row has text in it (in my case a name). It's supposed to stop when the first row is out of names starting after row 52 on the first sheet. I'm writing test code to see if it functions correctly but it only runs once. I'm starting the copying at row 52 on the first sheet and then transfering it to a second sheet starting on row 8 and from then on go row by row until sheet 1 is out of text. The first sheet is "Master Input for year."The from. The to is to the "quarterly NPI" Here's the code. Any help is appreciated.
    Please Login or Register  to view this content.


    It looks right to me. Why won't it work?
    Last edited by Cluv; 03-01-2011 at 11:44 AM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Why won't my Do while run?

    Hello Cluv,

    Welcome to the Forum!

    It stops running because cell A53 is blank.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-28-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Why won't my Do while run?

    Cell block a53 is not blank. that's the confusing part. There's data from row 52 to row 92 in the first sheet.

  4. #4
    Registered User
    Join Date
    02-28-2011
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Why won't my Do while run?

    I fixed the problem, it turns out I have to rereference the sheet i want to copy from at the end of the Do while.
    Last edited by Cluv; 03-01-2011 at 11:43 AM. Reason: solved

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Why won't my Do while run?

    hi, can you post sample workbook the code is not working properly on?

+ 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