Compare excel workbooks and highlight the differences

  • Hi


    Looking for a code to compare two workbooks and highlight the differences.

    I have 3 workbooks,

    Host.xlsm

    File1.xlsx( only sheet1 available)

    Flie2.xlsx( only sheet1 available)


    Below is the code but it doesn't work.


    Any help is appreciated. Thanks!


    Files

    • Host.xlsm

      (20.6 kB, downloaded 31 times, last: )
    • FILE1.xlsx

      (11.13 kB, downloaded 34 times, last: )
    • FILE2.xlsx

      (11.13 kB, downloaded 27 times, last: )
  • Hi AM,


    Try this method:


  • Hi AM,


    I ran the code on the sheets you uploaded, with using the RUN button on the host sheet and assigning this macro to the button and all sheets open. It works fine in this context.


    You appear to be running from a form is it?

    If the context has changed I need more information to correct the error.


    Did you try running the code in the context you uploaded your files?

  • Sorry, Justin. My miss.


    Could you please suggest me a way, if the data is jumbled


    for ex

    Workbook 1

    1 row

    2 row

    3 row


    Workbook 2

    3 row

    2 row

    1 row


    1 row should compare with 1 row if the data is not in order.


    Please share your thoughts.

  • Okay, You need to be a little more succint.


    What indicates which row should compare to another, is it the month? i.e. should the code compare each row that reflects January. If this is correct will there only be one row per month or is it by day, fortnight etc.


    Need a little clarity.