+ Reply to Thread
Results 1 to 2 of 2

deleting selected cell and rows above

  1. #1
    Registered User
    Join Date
    11-12-2010
    Location
    los angeles, ca
    MS-Off Ver
    Excel 2003
    Posts
    1

    deleting selected cell and rows above

    hello!

    i want my macro to find all cells in range "D1" that have the value 0(zero). and delete that row, along with the rows above that until there is a blank cell in range "C1". when a blank cell is detected, then i want the program to stop deleting. i think this might be done with a cell reference, but i cannot seem to get it.

    i tried a for each/next loop but am now stuck.. please help!! thank you!!

    so far all i've got is...
    Please Login or Register  to view this content.
    i know.. this only deletes the zeros. how do i get it to delete the rows??

    thanks!!
    Last edited by Leith Ross; 11-12-2010 at 05:23 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: deleting selected cell and rows above

    Range("D1") only has one cell. Do you mean Column D?

    Is this what you want?
    Please Login or Register  to view this content.

    Watch out for entries that are " " this will not be removed, do you need them removed?

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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