+ Reply to Thread
Results 1 to 3 of 3

Deleting rows based on conditions being met

  1. #1
    Registered User
    Join Date
    04-29-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    5

    Deleting rows based on conditions being met

    Hi there!

    I have a worksheet called "DO2" with 4 columns and I'm trying to write two different macros for it.

    1) Delete all rows if the first letter of a cell in column D is "d". The Range is the entire column D

    The second, separate macro I'm trying to write is

    2) Delete row 2 if DO3!B2=DO3!B3 AND DO3!D2=DO3!D3, do this for all rows in the entire length of the column. For example for row 100 you would delete row 100 if DO3!B100=DO3!B101 AND DO3!D100=DO3!D101


    Thanks so much!
    Shar
    Last edited by sharrukin; 04-29-2011 at 04:12 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Deleting rows based on conditions being met

    Regards your first query - Colin Legg has provided a detailed tutorial on efficient methods for deleting rows - see: http://www.xtremevbtalk.com/showthread.php?t=300757

    Regards your second query, a basic example:

    Please Login or Register  to view this content.
    the above makes certain assumptions re: contiguous areas and used columns but should work based on the info. provided - if not post back.

  3. #3
    Registered User
    Join Date
    04-29-2011
    Location
    Los Angeles
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Deleting rows based on conditions being met

    You're a rock star

+ 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