+ Reply to Thread
Results 1 to 16 of 16

Compare Price List

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Compare Price List

    Hello Again,

    I am looking for VBA Macros to compare 2 price list. I am trying to achieve the following.

    1. Script look in sheet one i.e. Old list for duplicate if it is their it should display in 3rd sheet i.e.duplicate with sheet name and row number
    2. Script look in sheet two i.e. New list for duplicate if it is their it should display in 3rd sheet i.e.duplicate with sheet name and row number
    3. Script look in both the sheet for duplicate values it it is there then it should display in 3rd sheet i.e. duplicate

    Also it should count the number of records on each sheet in column F1. If possible can we display the work % while checking both the lists.

    Sample file is attached which will give you more clarity of my request.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Cam someone please help me

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Anyone help me please

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    hi hecgroups, please check attachment, press "Find Duplicates" button

    Notes:

    The code does the following actions:
    1. Looks for duplicates in Old List data. Duplicate is a simultaneous repeat of Service Code, Service Description and Price more than once
    2. Looks for duplicates in New List data. Duplicate is simultaneous repeat of Service Code, Service Description and Price more than once
    3. Looks for duplicates in both sheets provided duplicate means simultaneous repeat of Service Code, Service Description and Price exists more than once in the other sheet

    For Old and New lists, the duplicate rows are separated by coma if multiple instances found. When comparing sheets and duplicate is found, the row number from Old list is followed by coma, row numbers (if multiple) are joined by &.

    The code does not have % of completion feature (I treat as fancy so I never use it).
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Thanks for your response for my request. I know that you will reply to me that is why i have send you PM. OK it is working as per my requirement on sample file. I will check on my original file and let you know.

    I need same requirement for differences in both sheets. Can it be possible in this thread or i will request on new thread. What you suggest.

  6. #6
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Hai Watersev i have just check on my original data the script is not executing. When i put the sample data it is working but not on original data. Can you check what is the problem is.

    Sample file is attached for your revision.

    Thanks for your usual cooperation.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    3. Looks for duplicates in both sheets provided duplicate means simultaneous repeat of Service Code, Service Description and Price exists more than once in the other sheet
    The code works exactly as described in post #4. To see what I mean please copy A2:C2 to A7:C7 on the New List and run the code.

  8. #8
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    I am sorry might be i did not explain to you properly.

    In post # 1 3.Script look in both the sheet for duplicate values it it is there then it should display in 3rd sheet i.e. duplicate

    It should look the duplicated in old sheet & new sheet for duplicate.

    Option 1 & 2 is working fine the only issue is option 3.

    the overall is i need to check the duplicate values in sheet itself and both the sheets.

    I hope now you understand what i mean.

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    can I have the correct result then for the file in post #6? Because now it contradicts with the result of your initial file with result shown in post #1

  10. #10
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Please see the sample done manually.

    What i am trying to do here is the following:-

    1. Looking the values is repeating within the same sheet i.e. old list.
    2. Looking the values is repeating within the same sheet i.e. new list.
    3. Looking the values is appear in both the sheets i.e. old list & new list.

    I hope this is make clarification of the issue.

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    A12:F12 in which sheet
    Duplicate

    if it was an error, please check attachment

    I've changed a bit how duplicate rows are represented after sheets comparison: rows from different sheets are separated by &
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    has A12:F12 been put in error as duplicate or I do not know something else?

  13. #13
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    A12:F12 in which sheet

  14. #14
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    I really appreciate your efforts thanks for your help. It is working as per my requirement.

    I have another request. I need same thing but difference in 2 sheets.

    I need to compare old list and new list for differences can you be possible.

  15. #15
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Compare Price List

    as different thread with explanations, sample file and result - yes

  16. #16
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    906

    Re: Compare Price List

    Thanks for your efforts. Topic marked as solved and Reputation added.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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