+ Reply to Thread
Results 1 to 3 of 3

Macro doesn't Finish. Stops at row 4678.

  1. #1
    Registered User
    Join Date
    04-13-2011
    Location
    Irvine, CA
    MS-Off Ver
    XP, Excel 2003
    Posts
    14

    Question Macro doesn't Finish. Stops at row 4678.

    I need help. I can't figure out why this macro craps out. It runs fine but doesn't complete the 4808 rows of data that I have. I tried 'Dim i As Long' but that didn't fix it(it wasn't Dim-ed before).

    What this Macro is supposed to do is effectively do a Find and Replace on Column C and delete the cells that have just one upper case L in it. So those cells are now blank.

    I have get data from our database for this report and format it. And this Macro is just part of the formatting that I do.

    In the below code, I have two MsgBox's. The first returns 4678. And the second returns 4808. They are rng and i respectively. Why? Probably because it hates me.

    So the Macro does most of the spreadsheet, just not the last 200 ish rows.

    I don't get it. Why does this Macro not complete? Am I reaching some kind of max or something?

    Darryl

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Macro doesn't Finish. Stops at row 4678.

    The issue is in your use of Select and ActiveCell.
    Without seeing a sample of your data, I would think this best does what you want.
    Note: i will be one more than rng because it is the next number in the loop.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro doesn't Finish. Stops at row 4678.

    Another way:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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