+ Reply to Thread
Results 1 to 7 of 7

Delete duplicate entry if both entries have corresponding pairs

  1. #1
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126

    Delete duplicate entry if both entries have corresponding pairs

    Please Login or Register  to view this content.
    The original code has varOut(i,1) >1 instead of long "if" line as seen. Here is the logic I am trying to incorporate:

    Assume this simple table
    OrderA Credit
    OrderA Invoice
    OrderB Credit
    OrderB Credit

    I want to delete those duplicates that have credit and invoice pairings basically (order A only), and so here is the logic I am following:

    If (OrderValue) And (Invoice) = (OrderValue) And (Credit) then Rows.Delete (Boolean test results in true only if both duplicates have invoice and credit pairing)

    At the moment this is the error I am getting: subscript out of range.

    WB.png
    Last edited by immigrated4urjob; 08-11-2021 at 06:01 AM. Reason: Workbook

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,833

    Re: Delete duplicate entry if both entries have corresponding pairs

    Rather than such a small sample, it would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126

    Re: Delete duplicate entry if both entries have corresponding pairs

    Quote Originally Posted by Mumps1 View Post
    Rather than such a small sample, it would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.
    I have added the image as organisational policy doesn't allow me to upload actual file. Basically only using Series ID and No column to match and delete pairs.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,833

    Re: Delete duplicate entry if both entries have corresponding pairs

    I don't need the actual file, just a dozen or so rows of generic data that is organized and formatted in exactly the same way as the original file.

  5. #5
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126
    Quote Originally Posted by Mumps1 View Post
    I don't need the actual file, just a dozen or so rows of generic data that is organized and formatted in exactly the same way as the original file.

    This is it to be honest.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,833

    Re: Delete duplicate entry if both entries have corresponding pairs

    "This is it to be honest."
    ????

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: Delete duplicate entry if both entries have corresponding pairs

    i/c in col.B, Order No in Col.I
    Please Login or Register  to view this content.

+ 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 duplicate entries?
    By terrypin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-20-2018, 06:22 AM
  2. [SOLVED] Search for duplicate entries but keep duplicate rows and add entry accordingly
    By GreenWheels in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2017, 06:13 PM
  3. how to avoid duplicate entry in excel from list entries
    By azeemsarwar in forum Excel General
    Replies: 3
    Last Post: 01-02-2013, 06:22 AM
  4. [SOLVED] Delete duplicate entries
    By ZeDoctor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2012, 11:18 AM
  5. How to find duplicate entries, and delete the earlier modified entry?
    By John2810 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2010, 01:26 AM
  6. Delete Duplicate Entries
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2009, 04:20 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