+ Reply to Thread
Results 1 to 7 of 7

Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    6

    Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Hello,
    I am trying to delete rows if a cell is blank
    and also delete rows with the same ID as
    the blank cell.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Hi

    In the attached file I added some 'helper' columns to check whether a row should be deleted or not.

    The first helper column contains a simple formula that just puts the corresponding ID number in it if the associated Name is blank i.e. this helper column contains all the ID numbers that will be removed.

    The second helper column then uses a formula to check whether the ID number in column A is found anywhere in the helper column that contains those ID's that will be removed. We can use the simple MATCH function to check this. If an ID number is NOT found, the MATCH function will give a #N/A result. So our formula just has to check if the MATCH is #N/A or not. We use the Excel ISNA function to check for this.

    So the second helper column will now show Y for those rows that are to be deleted.

    You can use a Filter on this helper column etc etc etc

    Now, are you really using Excel 2003 for this????

    zeddy
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Hi to all.
    I came up with this macro:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-25-2014
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Quote Originally Posted by zzzeddy View Post
    Hi

    Now, are you really using Excel 2003 for this????

    zeddy
    Works perfectly. Many thanks.

    Excel version. Typo originally, should have been 2013 and never updated. Whoops.

  5. #5
    Registered User
    Join Date
    04-25-2014
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Thank you. I'll try that later.
    Last edited by davesexcel; 02-13-2021 at 04:19 AM.

  6. #6
    Registered User
    Join Date
    04-25-2014
    Location
    Leeds, England
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Works perfectly. Grazie.
    Last edited by davesexcel; 02-13-2021 at 04:19 AM.

  7. #7
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Delete Row if Cell Blank and also Delete Rows with Same ID as Blank Cell

    Glad we were able to help .

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Delete Blank Rows As far down as first used cell
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-11-2013, 11:11 AM
  2. Delete Rows if a Cell is Blank?
    By pugsly8422 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-18-2012, 03:14 PM
  3. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  4. [SOLVED] To delete blank rows having blank cell in the needed raws
    By Alexander_Golinsky in forum Excel General
    Replies: 4
    Last Post: 05-04-2012, 03:11 PM
  5. Delete Rows if cell value in a column are blank
    By excelrequest in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2010, 01:30 PM
  6. Delete a range of rows above blank cell
    By d_rock90 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2008, 10:45 PM
  7. delete rows when cell is blank
    By mscanlo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2007, 06:06 PM
  8. [SOLVED] How can I Delete rows were the first cell is blank?
    By Mascot in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-25-2006, 12:05 PM

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