+ Reply to Thread
Results 1 to 5 of 5

Delete rows failing

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Delete rows failing

    On the attached worksheet, in column AH, I'm trying to delete everything below the used range. However, my macro for doing this (change now to select instead of delete) isn't working, because SOMETHING is below the used range. Here's the macro I'm using to select the row below the used range:
    Please Login or Register  to view this content.
    I think my problem may be non-printing characters, so I've been trying use the following macro to clean them, but to no effect:
    Please Login or Register  to view this content.
    Any help I can get on this is greatly appreciated.
    Attached Files Attached Files
    Last edited by jomili; 12-14-2011 at 06:38 PM. Reason: RoyUK told me to

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Dirty Cells

    Your "usedrange" is A1:AL 1007 and all the blank cells after AH69 are null values, meaning they cell is not blank. If you just highlight the null cells and hit delete that should fix the problem

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Dirty Cells

    Clean the blank cells and try this code

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Dirty Cells

    Jie Jenn,

    I guess maybe I didn't explain myself well enough. You're right that "all the blank cells after AH69 are null values"; that's what I want to delete, via macro. But this isn't just a one-time thing; I have 15 workbooks to do this to every day, as a tiny part of much larger operation. The option to "just highlight the null cells and hit delete" would be what I want to automate. How do we do that?

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Dirty Cells

    I revised the code

    Please Login or Register  to view this content.

+ 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