+ Reply to Thread
Results 1 to 5 of 5

delete duplicates items and keep duplicates others based on matching partial text and valu

  1. #1
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    delete duplicates items and keep duplicates others based on matching partial text and valu

    Hi
    I hope finding macro for bout 11000 rows between two sheets
    should delete the items and add the others in sheet main based on matching sheet DATA with this cases
    1- should match the partial text in column C (INVOICE,RECEIVABLE) and match the values whether in column D or E .
    2- if there is the same partial text in column C (INVOICE,RECEIVABLE) and the same values in column D or E for two sheets , then shouldn't delete from sheet main with considering the repeated items should be the same in counting
    this means if I have partial text in column C (INVOICE,RECEIVABLE) and the same values in column D or E for are repeated four times in sheet DATA but in sheet main are repeated three times then should add the fourth duplicates item into sheet MAIN to become four items as sheet DATA . as to if I have partial text in column C (INVOICE,RECEIVABLE) and the same values in column D or E for are repeated four times in sheet MAIN but in sheet DATA are repeated three times then should delete the the fourth item duplicated from sheet MAIN to become equal three duplicates items like sheet DATA .
    3- if I have partial text in column C (INVOICE,RECEIVABLE) and the same values in column D or E in sheet DATA but not repeated item and not existed in sheet MAIN then should add it to sheet MAIN ,if I have partial text in column C (INVOICE,RECEIVABLE) and the same values in column D or E in sheet MAIN but not repeated item and not existed in sheet DATA then should delete it from sheet MAIN
    4- any thing else except (INVOICE,RECEIVABLE) is existed in sheet MAIN then should deleted except row2 contains OPENING in column C.every time I will add new data in two sheets.
    5- should highlight new items are existed in sheet but not is another as I did it .

    the matching should be based on partial text and the same values together .
    last thing I want the result in sheet OUTPUT with keeping the original data in two sheets ,should clear data in sheet output before bring data when run the macro . and sort it the first invoice and the second RECEIVABLE with make the duplicates values under each other of them .also posted here
    https://www.mrexcel.com/board/thread.../#post-5938528

    sorry for big explenation , but it's necessary
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: delete duplicates items and keep duplicates others based on matching partial text and

    I hope somebody help

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: delete duplicates items and keep duplicates others based on matching partial text and

    Have read it in both web sites, and decide to reply here, with file attachment
    To get fast answers, you should guide through cases step by step:
    For example:
    Sheet Output:
    item 2: INVOICE-MS22, 10000 (exist in main, not in data). Why?
    item 4: INVOICE-A234, 2000 (exist in data= 10000, not in main). Why 2000 expected?
    First shot with that two cases.
    Quang PT

  4. #4
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: delete duplicates items and keep duplicates others based on matching partial text and

    Hi bebo
    first thanks for reply me .
    second I know this is not easy . What I ask when search for some parts not whole the items . when you search between two sheets just based on part INVOICE and the same values in column D ,E let's take your example
    INVOICE-MS22, 10000 serach part INVOICE also values in column D,E in sheets data,main
    sheet data = INVOICE-A234 and the values in column D= 10000
    sheet main =INVOICE-MS22 and the values in column D= 10000
    as bold and should be search and match based on first part and same values in column D,E then the result in sheet ouput will be
    INVOICE-MS22 and the values in column D= 10000 based on sheet DATA .
    becuase different numbers invoices between sheets it take more time from me to how do that , that's why I want matching based on partial items and the same thing with RECIEVABLE . I know this is too complicated and confused . if you still interest and need more example just tell me .

  5. #5
    Forum Contributor
    Join Date
    06-17-2021
    Location
    Asia
    MS-Off Ver
    2019
    Posts
    219

    Re: delete duplicates items and keep duplicates others based on matching partial text and

    Hi bebo
    what if delete any whole row for sheet main is not matched based on column D,E with sheet data
    I mean if there is the same value whether column Dor E in sheet data , for instance column D in sheet main contains values 2,000 for three times but sheet main contains one so should brings the two last duplicates values from sheet DATA and add to sheet main and any values is existed in sheet main but not sheet data then will delete from sheet main and if there is value is existed in sheet data but not existed in sheet main then should add to sheet main and should delete PAYAPALE VOUCHER from sheet main I don't need at all , should not match values for column D,E ,should ignore it when match the values . it depends on values for column D,E . I no know if it's possible , just suggetion to make easy things.
    Last edited by tubrak; 09-03-2022 at 06:02 AM.

+ 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. Highlight and delete duplicates items in the different spaces for multiple columns
    By abdo meghari in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2022, 07:19 AM
  2. [SOLVED] Add up quantitites in Column E based on duplicates in Column A, then delete duplicates
    By eli-vergara in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2016, 05:44 PM
  3. sort and delete duplicates matching criteria
    By winmaxservices in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2015, 02:11 PM
  4. Returning minimum valu without duplicates
    By ARayburn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2013, 01:51 AM
  5. Replies: 2
    Last Post: 03-24-2013, 12:54 PM
  6. remove duplicates based on partial text match
    By smelkin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2011, 09:45 AM
  7. Replies: 3
    Last Post: 03-09-2011, 07:00 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