Follow Me On...


 Written June-06

How to Diff Two BOMs

With each revision to a electrical circuit board more often then not there are going to be changes to the bill of materials. This guide will explain how you can diff two different Bill of Materials (BOM) using software tools rather then a) having to manually track changes or b) manually comparing line by line of a BOM to determine which parts have changed.

Potential reasons for needing to do this:

  1. While debugging you’re latest hardware revision, you may encounter strange behavior that you didn’t have on your previous revision.  Diff’ing your BOM can help identify potential part changes that could be causing the strange behavior.
  2. You may already have stock left of the components used on your previous revision and want to determine which parts have changed so you only have to order the parts you didn’t have before.


  1. Export both BOMs into a format which is tab delimited.
  2. Download a diff tool.  There are many free tools available that should be able to do the exact same thing.  I used a diff tool called Compare It!.  A free trial is available on this website.
  3. Inside the tool.  On the left side open the old bom and on the right side open the new bom.
  4. Once you’ve opened the 2nd bom, the tool will show you each of the differences.  If you just needed to see the differences then you can stop reading.
    Click to Enlarge
  5. If you want to get a report of only the items which have changed, then go to File->Report and select composite as the report type.  Click generate.
  6. In Excel, File->Open on the Files of type filter select Text Files and then select the file that you created in the previous step.  If a Text Import Wizard appears just go through it making any selections you see fit.  The default values were okay for me (tab delimited).
  7. In the workbook that opens you should notice that some lines have <! or !> at the beginning.  <! indicates what that line used to equal and !> indicates what the new row is.
  8. Next, highlight the first column by clicking on the A above the first column.
  9. Then, click the sort button which is an icon that has an A above a Z.  (see the above screenshot).  A warning prompt will appear.  Make sure Expand the selection is selected and click sort.
  10. Now all the entries with the !> should be grouped together.  Highlight them all and copy them to the clipboard.
  11. Open a new workbook and then paste.
  12. Finally, press CTRL-H or goto Edit->Replace and set it to Find: !> and Replace it with nothing.
  13. You’re finished!



If anyone knows of a diff tool that will let you export only the changes to the newer file, please post a comment.  I searched around for a bit but i realized it’d take longer then doing the extra steps in excel.



I’m sure there is a diff tool which would allow all the extra steps in excel to be skipped so if anyone knows of one or has any other suggestions please post your comments below.