• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Comparing two TOCs using Pivot

Perry Simpson

New Member
Hi All,

Not new to pivot tables, but my use of them is very basic. I would like to compare two sets of document "Table of contents" - These have been simply copied from two separate word documents and placed in individual worksheets, called TOC 1 and TOC 2.

Each file contains the same four columns: ID, Title, Page Number, and Sub-ystem.

What I would like to do is identify the differences between the two tables using pivot. The types of changes I would like to capture is:

1: Where the title text has a different "ID"
2: Where title has been altered (e.g. & has been replaced by "and')
3: Titles that do not exist in either TOC (i.e. specific content to the respective document)
4: and so on ...

I have assumed that a pivot would be the best way to do this, but I am always open to new ideas and trying something different ... I have uploaded the work book (EBS Compare.xlsx).

Thank you in advance.

Perry
 

Attachments

  • EBS Compare.xlsx
    55.7 KB · Views: 3
Hi:

Find the attached.

Click on the Run button on sheet2 . The code will compare sheet 1 and sheet 2 and will flag it matching or not matching. Hope this is what you are looking for.

Note:In VBE - tools- references add Microsoft Scripting runtime if the macro is throwing any error.

Thanks
 

Attachments

  • EBS Compare.xlsm
    53.8 KB · Views: 5
HI Nebu,

Thank you for the response using VBE - When I run this macro the following pop-up appears with the following message:

Compile Error:

Can't find project or library
(Module1 2:4)

Not sure if this is what you meant with your note at the end.

What do I need to do to clear this error.

Perry
 
Back
Top