+ Reply to Thread
Results 1 to 4 of 4

Delete rows on basis of duplicate & blank cell

  1. #1
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    390

    Arrow Delete rows on basis of duplicate & blank cell

    Hi
    thanks in advance
    I have a database which contains information related to ATM cards
    in Sheet
    A B C .............................
    1 Card no Account no. Branch Code ...........................
    2 123 1001
    3 123 1001
    4 1002
    5 124 1002
    6 1003
    7 125 1004
    8 126 1004

    I need the record as follows

    A B C .............................
    1 Card no Account no. Branch Code ...........................
    3 123 1001
    5 124 1002
    8 126 1004

    it will remove duplicate rows i.e. 3
    it will remove rows if card no. is blank i.e. 6
    it will remove the earlier record & keep latest i.e. 8

    I need a macro for this because it is continuing job everyday

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,626

    Re: Delete rows on basis of duplicate & blank cell

    3 Steps:
    1) remove duplicates on B and C
    2) remove empty (autofilter) on C
    3a) sort descending on A
    3b) remove duplicates on C (always first - as we already did 3a = with highetest A) will remain, others if exist (like row 7) will be removed
    3c) sort back ascending on A


    If that is not enough consider attaching a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    390

    Re: Delete rows on basis of duplicate & blank cell

    I have attached file of random data

    I want if account no. & Card no are duplicate remove row
    if card no. is blank remove row
    if account is duplicate & card no. is different then remove earlier record.
    duplicate blank row delete.xlsx
    regards

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,626

    Re: Delete rows on basis of duplicate & blank cell

    Try the following. This is basically registered and a bit fine-tuned (for instance checking if any row is visible after autofilter):

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 04-25-2015, 11:53 AM
  2. [SOLVED] Compare Rows, Delete duplicate values, Sum values but Retain blank rows
    By chancw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-24-2013, 07:38 AM
  3. [SOLVED] Delete rows based on duplicate cell, but leaving first and last duplicate.
    By LadyNicole in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2013, 05:07 AM
  4. Replies: 1
    Last Post: 05-10-2012, 04:58 PM
  5. [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
  6. Delete rows on conditional basis
    By mscanlo in forum Excel General
    Replies: 1
    Last Post: 04-26-2007, 10:49 AM

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