Skip to content
Guideasset registerequipment tagsexcel

How to compare two equipment lists in Excel

Find the tags that are in one equipment list but not the other, such as a P&ID tag list against a CMMS export, and the tags whose details disagree, using COUNTIF and XLOOKUP.

Author
AATTRL team
Published
Reading time
5 min read

Sooner or later every plant has two equipment lists that are meant to agree and do not: the tag list taken from the P&IDs and the export from the CMMS, the contractor's handover list and the owner's register, last year's list and this year's. This guide shows how to find, in Excel, the tags that are in one list and not the other, and the tags that are in both but with different details.

It assumes one workbook with two sheets, named Register and PID. Each has a header in row 1, tags in column A from row 2 and descriptions in column B. Change the sheet names and ranges to fit your lists.

1. Find tags that are missing from the other list

On the Register sheet, in an empty column, in row 2, enter this and fill it down:

=COUNTIF(PID!$A$2:$A$5000,A2)

The result is how many times the tag in that row appears on the PID sheet. A 0 means the tag is in the register but not on the P&ID list. Filter the column for 0 to see them together.

Then do the same in the other direction. On the PID sheet, row 2:

=COUNTIF(Register!$A$2:$A$5000,A2)

A 0 here is a tag on the drawings that never reached the register. The two results answer different questions, so you need both: the first finds records with no drawing behind them, the second finds equipment with no record.

As in the duplicates guide, COUNTIF ignores upper and lower case, which is what you want for tags, and treats ? and * in a tag as wildcards, which will give wrong counts for any tag that contains one.

2. Allow for tags written in different ways

Step 1 only matches tags typed identically. If one list says P-101B and the other P101B, both rows show 0 and look like missing equipment. Before you trust a 0, compare on a key that removes what people type inconsistently.

On both sheets, in a spare column (say column H), row 2, filled down:

=UPPER(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TRIM(A2),"-","")," ",""),"_",""),"/",""))

This strips hyphens, spaces, underscores and slashes and converts to capitals. Then count on the key instead of the tag. On the Register sheet:

=COUNTIF(PID!$H$2:$H$5000,H2)

Rows that showed 0 in step 1 but 1 here are the same item written two ways. They are not missing, but one of the two lists needs its tag corrected, and you should decide which spelling is the standard before changing either.

3. Compare the details of tags that are in both lists

For tags present in both lists, pull the other list's description alongside your own. On the Register sheet, row 2:

=XLOOKUP(A2,PID!$A$2:$A$5000,PID!$B$2:$B$5000,"not in PID list")

XLOOKUP looks for the tag in column A of the PID sheet and returns the description from the same row. It looks for an exact match unless you tell it otherwise, and the fourth argument is the text to show when there is none; leave it out and unmatched rows show #N/A.

Put the result next to your own description and read down the two columns, or add a third column such as =B2=C2, which shows FALSE where the two differ. Expect many FALSE results that are only differences in wording, such as Feed pump against FEED PUMP P-101A. The ones to look for are differences in substance: a different service, a different equipment type, a spare in one list and a duty item in the other.

The same formula works for any other column: change PID!$B$2:$B$5000 to the column holding the manufacturer, the location or the parent tag.

What this does not catch

  • Leading zeros. TK-001 and TK-1 are not matched by the key in step 2.
  • Letter-for-digit mix-ups. V-2O1 (letter O) and V-201 look the same and do not match. The duplicates guide has an extra column for these.
  • Duplicates inside one list. XLOOKUP searches from the first row and returns the first match, so a second row with the same tag is never read.
  • Whether either list is right. Two lists can agree and both be wrong. Agreement with the drawings is not agreement with the plant.

Checking one list on its own

Comparing two lists is easier when each is clean. The free duplicate tag finder lists exact repeats, separator variants, look-alikes and leading-zero variants in a pasted tag column, and the asset register checker reads an Excel equipment list and reports missing fields, broken parent links and tag format problems. Both run in your browser, so the list is not uploaded.

If reconciling the two lists is more work than you have time for, AATTRL does the clean-up as a paid service, with a fixed written quote before any work starts.

Sources

The XLOOKUP behaviour described here (arguments, exact match by default, #N/A when nothing is found, search from the first item, not available in Excel 2016 and 2019) was checked on 29 November 2026 against Microsoft Support's XLOOKUP function page. The COUNTIF behaviour was checked on 28 November 2026 against the COUNTIF function page. The COUNTIF and key formulas in steps 1 and 2 were run on a two-sheet test workbook containing each example tag in this guide. The XLOOKUP formula in step 3 follows the syntax on Microsoft's page.