+ Reply to Thread
Results 1 to 6 of 6

find duplicate rows and delete when = 1

  1. #1
    Registered User
    Join Date
    11-24-2015
    Location
    Dobczyce, Poland
    MS-Off Ver
    365
    Posts
    15

    find duplicate rows and delete when = 1

    Hi All,
    I will be really appreciate for your help.
    It will be very helpful to do it by macro.

    I' d like to find duplicate rows (conditions on column A,B together)
    compare it and delete entire row
    when on (Col G) is value = 1.
    when on (Col G) is value = 2 do nothing.


    I have attached a simple workbook on this.
    Thanks, in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: find duplicate rows and delete when = 1

    Please Login or Register  to view this content.
    Last edited by ikboy; 12-23-2015 at 02:25 AM. Reason: code tags added

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,770

    Re: find duplicate rows and delete when = 1

    @ikboy .
    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    11-24-2015
    Location
    Dobczyce, Poland
    MS-Off Ver
    365
    Posts
    15

    Re: find duplicate rows and delete when = 1

    Thank You.
    It's works perfetcly.ikboy, You're genius.

  5. #5
    Registered User
    Join Date
    11-24-2015
    Location
    Dobczyce, Poland
    MS-Off Ver
    365
    Posts
    15

    Re: find duplicate rows and delete when = 1

    ..after more tested not as perfect as I thought.

    It's works but... for only one duplcate row in range.
    error 1004 in line
    Please Login or Register  to view this content.
    I don't know if It's possible to change this code ??
    to compare and remove more each time.
    Means when I paste more rows on the same time.

    Thanks in advance.

  6. #6
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: find duplicate rows and delete when = 1

    Please see amended code

+ 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 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
  2. VBA helps needed to Sum duplicate values and delete duplicate rows
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2013, 11:40 PM
  3. [SOLVED] How do I find duplicate rows in a list in Excel, and not delete it
    By Matthew in FL in forum Excel General
    Replies: 6
    Last Post: 12-12-2012, 02:27 AM
  4. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  5. [SOLVED] Sum Duplicate values then delete duplicate rows
    By keekdapolak in forum Excel General
    Replies: 7
    Last Post: 09-20-2012, 02:57 PM
  6. delete duplicate rows, delete empty rows
    By loade in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-03-2012, 05:42 AM
  7. How to find duplicate entries, find which has the lowest value, and delete the rest?
    By John2810 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-05-2011, 06:39 AM
  8. find semi-duplicate rows and delete row less value?
    By bsfell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2011, 05:54 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