+ Reply to Thread
Results 1 to 2 of 2

Delete row if...

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    7

    Delete row if...

    Hi

    I have a data sheet with over 12000 rows. In column A I have either 104 or 107, in column B I have a lot of number that can be shown under both 104 and 107. In column C I have a document number and in column D I have a number or text string.

    what I would like is to delete rows that don't contain the highest document number for where column A, B and D is identical. I have tried to illustrate it below.

    e.g.
    104 - 400002 - 51000003 - 74 --> keep
    104 - 400002 - 51000001 - 74 --> delete
    104 - 400001 - 51000002 - 74 --> delete
    104 - 400001 - 51000005 - 74 --> delete
    104 - 400001 - 51000006 - 74 --> keep
    104 - 400001 - 51000007 - BD1 --> keep
    107 - 400002 - 51000003 - 74 --> keep
    107 - 400002 - 51000001 - 74 --> delete
    107 - 400001 - 51000002 - 74 --> delete
    107 - 400001 - 51000005 - 74 --> delete
    107 - 400001 - 51000006 - 74 --> keep
    107 - 400001 - 51000007 - BD1 --> keep

    Thanks for your help in advance.
    Last edited by vistrup; 11-05-2014 at 10:45 AM.

  2. #2
    Registered User
    Join Date
    08-27-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Delete row if...

    I found another work around
    Using the following =IF(MAX(IF(A:A=A2207;IF(B:B=B2207;IF(D:D=D2207;C:C))))=C2207;"K";"D") and then hit ctrl+shift+enter it is possible to determine if the row needs to be deleted.

+ 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. Replies: 1
    Last Post: 11-30-2013, 06:37 AM
  2. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  3. [SOLVED] Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 08:12 PM
  4. [SOLVED] Re: Macro to delete sheets and saves remaining file does not properly delete module
    By bhawane in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 01:05 PM
  5. Re: Macro to delete sheets and saves remaining file does not properly delete module
    By pherrero in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 01:05 PM

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