Guide
BOM consolidation: merging same-MPN lines safely
Consolidating a BOM means merging lines that describe the same purchased part into one: add the quantities and combine the designators. It is safe when the lines match on MPN, manufacturer, footprint and fitted state. After a merge the quantity must still equal the designator count, and no designator may appear twice.
Steps
Merging a group safely
Normalise the key
Trim the MPN, ignore case and remove spaces, so GRM155R71C104KA88D and grm155r71c104ka88d match.
Group populated lines
Group by MPN. Leave DNP lines out of every group, because their fitted state differs.
Compare the other fields
Within a group, compare manufacturer, footprint and internal part number. A difference is a question, not a merge.
Merge
Sum the quantities, join the designators with repeats removed, and note the original line numbers.
Sort designators naturally
R2 before R10, prefix first. Alphabetical order puts R10 before R2.
Re-prove the result
Quantity equals designator count, no designator is on two lines, and the sum of quantities is the same as before the merge.
Causes
Why duplicates appear
Duplicates are rarely typed by hand. A tool that groups by value and footprint splits one MPN across lines when the value strings differ, 10k on one symbol and 10K on another. Hierarchical sheets can group separately. Sub-assembly BOMs joined into one file repeat their common parts. A page-wrapped PDF can split one line in two. An alternate source entered as its own row looks like a duplicate but is not one; see alternate and substitute parts.
Example
A worked merge
Before
line mpn qty ref_des
4 GRM155R71C104KA88D 3 C1, C2, C10
9 GRM155R71C104KA88D 2 C4, C11
After
4+9 GRM155R71C104KA88D 5 C1, C2, C4, C10, C11The MPN, manufacturer and footprint agree and both lines are fitted, so they merge. The quantities add to 5. The designators join in natural order, C4 before C10, and the count still ties: five designators, quantity 5. Had line 9 listed C2 instead of C11, the merged list would hold four distinct designators against a quantity of 5. That mismatch is the signal to stop and look at the source.
Result
Keep both versions
The as-printed BOM is the record of what the source said. The merged BOM is the working copy for buying. A merged line should say where it came from, for example merged lines 4, 9, so a reviewer can trace it. Send the assembler the merged file: fewer lines to source and set up, and the quantities are what is bought. Changes between releases belong in the log described in BOM revision control.
Decision table
Merge or keep apart?
| Situation | Merge? | Why |
|---|---|---|
| Same MPN, manufacturer and footprint; both lines fitted | Yes | One purchased part |
| Same MPN, one line DNP | No | Fitted state differs and the totals would change |
| Same MPN, manufacturer name spelled two ways | Yes, after normalising | The same part under two spellings |
| Same MPN, different footprint | Review | A data error, or a deliberate choice |
| Same internal PN, different MPNs | No | Alternates, not duplicates |
| Different internal PNs, same MPN | Review, then merge | A duplicate identity; retire one number |
| Same value, different MPNs | No | Different parts |
Pitfalls
What goes wrong
- Merging DNP into fitted lines. The merged quantity buys parts that are never placed.
- Hiding a data error. Two lines listing the same designator merge into one list with the repeat removed, and the quantity then disagrees. Look at the overlap first.
- Merging across builds. Lines from two variants of one board, merged into one file, give a BOM that matches neither build.
- Missing quantity. A line with no quantity sums as zero and understates the merged total.
- Suffix mismatch. The same part written with and without a packaging suffix does not group, so the duplicate survives.
- Lost notes. A merge drops per-line notes unless they are carried over.
- One-character differences. A misread character makes two lines of one part look like two parts. See OCR pitfalls in part numbers.
The tool
How BOMParser helps
BOMParser reports every MPN that appears on more than one populated line, with the line numbers and quantities, ignoring case and spaces. The Merged by MPN view sums the quantities, joins the designators in natural order and flags conflicts: differing part numbers, manufacturers or footprints, or a missing quantity. DNP lines are never merged, and the as-printed view is never altered. Either view exports to CSV or XLSX. Convert a file on the BOM to CSV page; pricing lists the plans. Free: one BOM every 24 hours, ten sheets or fewer, no registration. A free run stops at sheet 10 of a longer BOM. Redeem a code and the ceiling rises to 150 sheets.
FAQ
BOM consolidation questions
What is a duplicate line in a BOM?
Two or more populated lines for the same part, usually the same MPN. Together they make one purchased quantity and one designator list.
Is it safe to merge lines with the same MPN?
Usually, once manufacturer, footprint and fitted state also match. After merging, check that the quantity equals the designator count and that no designator appears twice.
Should DNP lines be merged?
No. A merged line would mix fitted and unfitted parts and inflate purchase totals. Keep DNP lines separate and flagged.
How should designators be ordered after a merge?
Naturally: R2 before R10, grouped by prefix. Alphabetical sorting puts R10 first and makes lists hard to compare.
What if the same MPN lists different manufacturers?
Normalise spelling differences first. If the manufacturers genuinely differ, you have two sources for one code, which needs an engineering decision before you merge.
Why does the quantity not equal the designator count after a merge?
Usually because two lines shared a designator, or one line had no quantity. Trace the merged lines; the mismatch points at a data error.
Do I need to keep the unmerged BOM?
Yes. It records what the source said and lets you trace a merged line back. Merge in a copy and note which lines were combined.
Keep reading
Related guides
MPN vs internal part number
Why a BOM needs both, and how to keep a mapping table.
BOM revision control
Rev letters, change logs and matching Gerbers.
Alternate and substitute parts
Recording alternates without breaking the count.