Excel Trucking Reconciliation: Formula for Markup Calculation
Question details
The user needs an Excel formula to calculate the trucking markup by subtracting the trucking cost in column N from the customer-billed total in column H, handling variable invoice group ranges where totals appear on the final row.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Reconciling trucking invoices and calculating profit markups based on customer-billed totals and trucking costs across grouped data.
- Observed behavior
- The user is struggling to create a dynamic formula that properly aligns column H and column N to output the correct markup in column O for variable invoice groups.
Ensure that the data in your customer-billed total column (H) and trucking cost column (N) are formatted as numbers or currency, and identify whether your invoice groups are separated by blank rows or unique invoice IDs.
Use an IF Statement for Invoice Group Totals
This method is recommended when your markup should only be calculated on the final row of each variable invoice group.
When dealing with variable invoice groups, you often only want the markup to appear on the row that contains the totals, leaving the individual line items blank in the markup column. By using an IF statement, Excel will verify if a total exists in column H before performing the subtraction.
Click on the first cell in column O (e.g., O2) where you want the markup calculation to appear.
Type the formula: =IF(H2>0, H2-N2, ""). This tells Excel to subtract the trucking cost (N2) from the billed total (H2) only if there is a value greater than zero in H2.
Press Enter, then click the small square at the bottom-right corner of cell O2 and drag it down to fill the formula through the rest of your reconciliation sheet.

Reconcile Markup Using SUMIFS for Unaligned Rows
Best used when customer-billed totals and trucking costs are recorded on different rows but share a common Invoice ID or Load Number.
Calculate Reconciliation Markups Easily in WPS Spreadsheet
WPS Spreadsheet offers full compatibility with standard financial formulas, allowing you to seamlessly manage trucking reconciliations, calculate markups, and handle dynamic invoice ranges for free.
- 1. Open your reconciliation file: Launch WPS Spreadsheet and open your existing trucking reconciliation workbook.
- 2. Apply the markup formula: Click on cell O2 and enter your subtraction or IF formula (e.g., =H2-N2) to calculate the margin.
- 3. Drag to fill: Double-click the fill handle in the bottom-right corner of the cell to instantly apply the markup formula to all invoice groups.

Frequently Asked Questions
How do I apply the markup formula to a continuously expanding range of invoice groups?
You can format your data as an Excel Table by selecting your data and pressing Ctrl+T. This automatically expands your formulas down column O whenever new trucking costs or billed totals are added to the bottom.
Why is my subtraction formula returning a #VALUE! error?
This error occurs if column H or column N contains text strings, invisible spaces, or dashes instead of actual numbers. Use the Find and Replace tool to remove spaces, or ensure the cells are formatted as Numbers.
Can I highlight negative markup values automatically in my reconciliation sheet?
Yes. Select your markup column (O), navigate to Home > Conditional Formatting > Highlight Cells Rules > Less Than. Enter 0 in the prompt and choose a red fill to easily spot unprofitable loads.




