+ Reply to Thread
Results 1 to 22 of 22

Find differences in two sets of pasted data and parse this data

  1. #1
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Find differences in two sets of pasted data and parse this data

    Hello everyone,

    I am really stumped here!!!!

    I am working in Excel 2016/365 and am wanting to compare two imports of data and to parse the differences between the two "pastings, depending on the dollar amounts of columns J and K.

    Ideally, I would like to bulk copy from the source, paste data from the morning into one tab, then later paste the afternoon data in another tab, and then have a tertiary tab to show me the results of the parsing, or the differences between the two pastes of data in terms of dollar amounts i.e. amounts that had changed columns J and K see example attached). There are headers in the data and the source is a .csv. I would like to rely on a formula as I am not going to be here forever and not many people know VBA.

    Please see the example attached for the information with the differences-I have bolded and high-lit the differences.

    Would I use a vlookup or a match of some kind to get the ideal result? I am focusing on the "amount " in column J as well as the "docket balance" in column K. All I am interested in in terms of the final output are the rows that had changes over the two time periods in terms of columns J and K.

    Any help would be greatly appreciated, I thank you for your time and of course, effort!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Was that a typo in C12 where you have NKKR-91-EX-00002, but in C6 which appears to be the same record you have NKKRR-91-EX-00002, i.e. an extra 'R'

    Will all the morning records be there in the afternoon?

    Will the order of records always be the same, albeit there may be additional ones in the afternoon.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Hi and thanks for responding!

    To answer your questions:

    Was that a typo in C12 where you have NKKR-91-EX-00002, but in C6 which appears to be the same record you have NKKRR-91-EX-00002, i.e. an extra 'R'

    No, this was the correct file name.

    Will all the morning records be there in the afternoon?
    yes, they should


    Will the order of records always be the same, albeit there may be additional ones in the afternoon.
    No, the order can change-my first thought was to do a simple subtraction based off the two tabs..but an out of sort record blew that party.

  4. #4
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Hi in order to give you more assistance, the only real key fields we are focusing on are the "amount " in column J as well as the "docket balance" in column K. if one or both those values change from AM to PM, I want the remainder of the row associated with the changed values as well as how much the fields changed.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Quote Originally Posted by cwoodgate View Post
    Hi in order to give you more assistance, the only real key fields we are focusing on are the "amount " in column J as well as the "docket balance" in column K. if one or both those values change from AM to PM, I want the remainder of the row associated with the changed values as well as how much the fields changed.
    But that doesn't explain how any function can determine that the row 12 is the same as the row 6 record and row 5 the same as row 11.

    There needs to be some key that connects the two records. It seemed reasonable to assume that the ABC Doc No would be that key field so I'm surprised that it isn't. But since it isn't how should any two records be paired in order to deduce any difference?

  6. #6
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Hi thanks for getting back to me.
    I spent the night looking at some data and we can indeed use the ABC doc number from AM to PM as a basis for comparison-looks like that type was imported e.g. a system created.
    I asked and turns out that was a 1/100,000 orrurrance odds-some luck I had to include it in my sample to you, so my apologies for that. We can definitely use the ABC document number in column C as a primary key.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    OK,

    However the original question is still relevant. i.e.

    Was that a typo in C12 where you have NKKR-91-EX-00002, but in C6 which appears to be the same record you have NKKRR-91-EX-00002, i.e. an extra 'R' in the doc number.

    I can only presume it's a typo since you want to output the difference of 7.5 for the doc balance between these two rows.

  8. #8
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Yes, it was in fact a typo that was imported from the source data. You are correct in your assumption here.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Hi,

    The attached contains the following macro.
    I know you said you'd prefer not to have a macro but to be honest it's far simpler than creating formulae to work out where there are differences and only list the differences.
    If you don't want the macro then personally I'd just copy the O1:R1 formulae down sheet2 and to see the differences only just filter sheet2 for "Y" in column R

    Please Login or Register  to view this content.
    Add the afternoon data to Sheet2 A:N. If you're copying from a file you you might consider building that step into this macro.

    Click the blue button to run the macro which will automatically add the formulae in columns O:R and populate sheet3 with the differences which will be columns P:Q
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Thanks for this! Im gonna plug it in and see what goes on. Ill report back.

  11. #11
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Okay this is what Im looking for-really quite impressive. I was wondering how I can modify this code to also provide the changes in dollar amounts for J and columns K separately. The reasons I ask-is though its rare, sometimes the amount in column J and the docket balance in column individually vary-it would be nice to be able to see the differences if they were to occur, piecemeal. Thank you so much for stopping to help me.

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    If I understand the Q. then the simplest non macro way would be to filter sheet 2 for non blanks in either columns P or Q.

    Using the macros then I've added three Option Buttons. Clicking one of them will filter sheet3 for different choices.

    See attached.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    This is so badass. It works perfectly! How did you set up this filter?!?!?

  14. #14
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Note that on sheet 3 A1:C2 are the filter values.
    A1:B2 is named 'Crit1'
    B1:B2 is named 'Crit'
    B2:C2 is named 'Crit2'

    When you click one of the option buttons that updates sheet2 cell A1 with either a 1, 2 or 3.

    Where previously the macro that filtered the data used 'Crit' I've now changed it so that it recognises from A1 on Sheet1 which option button has been clicked and it then filters the data accordingly. The macro is now

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Man-the things you can learn. Wow. How may I go about moving the filter from sheet 2 to sheet 3 where the results are?

  16. #16
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Hi,

    See attached

    You just need to select all three option buttons (hold the Ctrl key down when you select them) and Cut and Paste them to sheet 3.
    Then Cut and Paste the Sheet2 A1 cell (named 'FilterChoice') to say D1 on Sheet3 and make sure the option button Properties point to the name 'FilterChoice' rather than A1

    You might want to drag the option buttons down a bit so that you can hide rows 1:2 on sheet 3 and widen row 4 so that the option buttons are all together, or space them out horizontally
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Hello,
    Thanks so much for your work. I appreciate you taking the time to help me. Not only do I have a product that looks and works great, I have learned quite a bit as well

  18. #18
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Richard,
    Hello, seems I have a small hiccup.
    I am noticing that my data when pasted is overlapping formulas in another column.. This overlap results in data spreading out into the next column, "O" or the Morning row, where formulas are-this makes the macro not function well. How may I move the functional area of the macro so that it is not referencing column "O"? I tried to insert a column in column O to give the the pasted data some room to breathe, however the macro fails.

    Clare
    Last edited by cwoodgate; 05-06-2019 at 02:12 PM.

  19. #19
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    And...it appears that sometimes, though rare, the ABC doc number in column C WILL have repeating values that interlace with the funding codes in column A.
    e.g. funding code 2A and 2B will both have a funding code of 70RCAC9KG0000123...

  20. #20
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    Hi Clare,

    I don't understand.

    Would you upload the workbook you're using.
    Make sure you show a starting position sheet and tell me exactly what you're doing and show another sheet which shows what you end up with.

  21. #21
    Registered User
    Join Date
    05-02-2019
    Location
    San Francisco, California
    MS-Off Ver
    10
    Posts
    13

    Re: Find differences in two sets of pasted data and parse this data

    Hi Richard,
    Give me some time so I can put together an exhibit for you; thanks for checking back in-may i DM you?
    Clare

  22. #22
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find differences in two sets of pasted data and parse this data

    It's sufficient to post here. I'll pick it up when you do.

+ 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. Reconciliation of 2 sets of data for differences
    By leigh3980 in forum Excel General
    Replies: 2
    Last Post: 02-07-2019, 11:09 AM
  2. Find Differences Between Two Sets Of Data...
    By needhelp889 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-01-2018, 11:39 AM
  3. Replies: 4
    Last Post: 01-27-2014, 01:37 PM
  4. Highlighting differences between two sets of data
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-02-2011, 11:44 AM
  5. Replies: 1
    Last Post: 06-10-2011, 06:32 AM
  6. Replies: 0
    Last Post: 07-31-2009, 09:44 AM
  7. How do I compare 2 sets of data and highlight differences?
    By Perplexed1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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