Portfolio Project · Advanced Excel · Case Study

International Freight Invoice
Audit Automation

A simulated multi-sheet Excel system replicating real international freight audit workflows — Ocean (LCL, FCL 20', FCL 40') and Air, with per-account tolerance rules, demurrage calculation, spot quotes, short-pay detection, and executive dashboard reporting.

Advanced Excel Case Study Ocean Freight Air Freight Simulated Data · No real client info
60
Invoices Processed
7
Workbook Sheets
5
Carriers Simulated
7
Tolerance Rules
4
Container Types
Portfolio simulation notice: All carrier names, account names, invoice data, rates, container details, and trade lane information in this case study are entirely fictitious and created for portfolio demonstration purposes only. This project was built to showcase the technical methodology used in international freight bill auditing — no real client, carrier, or proprietary rate data has been used or referenced.

The Case Study

Five-Step Walkthrough

1
The Problem
Why this tool was needed

A freight audit firm processes thousands of international invoices weekly across Ocean and Air modes. Each invoice contains multiple charge components — base freight, Bunker Adjustment Factor (BAF), Terminal Handling Charges (THC), documentation fees, and Peak Season Surcharges — that must each be individually verified against either a contracted rate or a spot quote.

Before automation, analysts manually cross-referenced every line against rate tables in separate files. There was no consistent demurrage calculation, no tolerance-based classification per account, and no standardised exception format across the team.

  • Manual rate lookup: 8–12 minutes per invoice
  • No automated demurrage — free days tracked by hand per account
  • Tolerance rules varied wildly by account but weren't codified anywhere
  • Short-pay and balance due items had no systematic tracking
  • Spot quotes mixed into the queue with no differentiation from contracted rates
  • Exception reports were inconsistent across analysts — no standard format
2
Data Architecture
What data lives where and why

The workbook is structured across seven sheets, each with a distinct purpose. No manual data entry is required once the Invoice Log and Rate Tables are populated — every downstream sheet calculates automatically.

  • 📋 Case Study Overview — full written narrative of the methodology (the sheet you read first)
  • 🧾 Invoice Log — 60 simulated invoices with all charge components broken out separately: base freight, BAF, THC, documentation fee, PSS, demurrage days and amount, amount paid, short-pay amount, short-pay reason, and balance due reference
  • 📊 Rate Tables — two sections: Contracted Rate Table (carrier + origin + destination + container type → base rate, with ~7% intentional gaps to simulate "rate not on file") and Spot Quote Register (15 spot quotes with unique IDs, carriers, lanes, rates)
  • 🏦 Account Tolerances — per-account rules: tolerance type (flat dollar or percentage), threshold value, free days at port, carrier per-diem demurrage rates, and short-pay permission flag
  • ⚙ Audit Engine — the automation core: rate matching, charge calculation, demurrage logic, tolerance classification, payment status flags, action notes
  • 📈 Exception Report — filtered view of all flagged invoices only, colour-coded by exception type
  • 🎯 Dashboard — KPI cards and breakdown tables for management reporting

Rate tables use a composite key (Carrier|Origin|Destination|ContainerType) as the lookup identifier — a deliberate design choice that prevents false matches when the same carrier operates multiple service types on the same lane.

3
Formula Logic
How the automation actually works

The Audit Engine is built on five core formula patterns that chain together to process each invoice from raw input to actionable output:

XLOOKUP — Rate Matching
=IFERROR(XLOOKUP(composite_key, rate_table_keys, rate_table_rates, "RATE NOT ON FILE"), "RATE NOT ON FILE")
Matches each invoice to its contracted or spot rate using a composite key. IFERROR wrapper returns a text flag instead of #N/A when no rate exists, preventing error propagation downstream.
Dynamic Demurrage
=IF(dem_days > free_days, (dem_days - free_days) * per_diem_rate, 0)
Pulls each account's free day allowance from the tolerance table. Charges only for days beyond the free period. Air freight carriers return $0 — no demurrage on air.
Per-Account Tolerance (IFS)
=IFS(tol_type="flat", ABS(variance)>tol_value, tol_type="pct", ABS(variance_pct)>tol_value)
Reads each account's tolerance type and applies the correct comparison. Flat accounts compare dollar variance. Percentage accounts compare variance %. A $0.01 tolerance account and a $100 tolerance account use the same formula — different threshold only.
Status Classification
=IFS(rate="RATE NOT ON FILE","⚠ RATE NOT ON FILE", variance>threshold,"🔴 OVERCHARGE", variance<-threshold,"🟡 UNDERBILLED", TRUE,"✅ WITHIN TOLERANCE")
Final status logic applied after tolerance check. Four possible outputs drive colour-coding, exception filtering, and dashboard aggregation throughout the workbook.
Short-Pay Detection
=IF(AND(amount_paid>0, amount_paid<billed_total), "🔶 SHORT PAY", IF(balance_due_ref<>"","📋 BALANCE DUE","UNPAID"))
Detects short-pay situations where the client remitted less than invoiced, and balance-due situations where a carrier is collecting on a prior invoice. Overlays the standard audit status with a payment exception code.
SUMIFS / COUNTIFS — Dashboard
=SUMIFS(variance_col, carrier_col, carrier, status_col, "🔴 OVERCHARGE")
Dashboard KPIs driven entirely by SUMIFS and COUNTIFS referencing the Audit Engine. Change any rate in the Rate Table and every KPI card, carrier breakdown, and exception rate updates in real time.
4
Sample Data Preview
What the Audit Engine output looks like

A representative sample of records from the Audit Engine, showing the full output for different exception types — all figures are simulated:

Invoice IDCarrierModeContainerAccountBilled ($)Contracted ($)Variance ($)Status
INV-0003Maersk LineOceanFCL 40'GlobalTech Mfg$6,142.00$5,890.00$252.00🔴 OVERCHARGE
INV-0011Cathay PacificAirAir FreightMeridian Pharma$3,218.50$3,218.48$0.02🔴 OVERCHARGE
INV-0017CMA CGMOceanLCLSummit Retail$1,940.00$1,905.00$35.00✅ WITHIN TOLERANCE
INV-0024Evergreen MarineOceanFCL 20'Pacific Dist.$3,650.00⚠ RATE NOT ON FILE
INV-0031FedEx IntlAirAir FreightNorthland CG$2,890.00$2,950.00-$60.00✅ WITHIN TOLERANCE
INV-0038Maersk LineOceanFCL 40'Everest Ind.$5,200.00$4,880.00$320.00🔶 SHORT PAY
INV-0045CMA CGMOceanLCLBlue Horizon$2,140.00$2,050.00$90.00🔴 OVERCHARGE

Note row INV-0011 — Meridian Pharma's $0.01 tolerance means a $0.02 variance on an Air invoice triggers a full overcharge flag. Same variance on a Northland Consumer Goods account ($100 tolerance) would pass as within tolerance. Same formula, different account threshold.

5
Results & Real-World Parallel
What this demonstrates and what it maps to
~30%
Invoice exception rate across simulated dataset
90%
Reduction in per-invoice processing time vs manual
100%
Consistent exception format across all analysts
Real-time
Dashboard updates when any rate or invoice changes

This simulation mirrors the actual audit workflow at Cass Information Systems, where the same core logic — composite key rate matching, multi-component charge verification, per-account tolerance classification, demurrage calculation against free-day allowances — is applied to real international freight accounts daily across 20+ Fortune 500 clients.

The $450K+ in annual carrier overcharge recovery cited in my professional experience is produced by this exact methodology at production volume. This workbook is the methodology, made visible and interactive.

Technical Skills

Tools & Techniques Used

Excel Formulas & Logic

XLOOKUP IFS / Nested IF IFERROR SUMIFS COUNTIFS Conditional Formatting Composite Key Design Multi-Sheet Linking Dynamic Threshold Logic Flat vs Percentage Tolerance Executive Dashboard (KPI Cards) Exception Filtering Named Assumption Cells

Freight & Logistics Terminology

Ocean Freight Air Freight LCL — Less Than Container Load FCL 20' — Full Container Load FCL 40' — Full Container Load Bunker Adjustment Factor (BAF) Terminal Handling Charges (THC) Peak Season Surcharge (PSS) Demurrage Free Days at Port Per-Diem Rate Spot Quotes Contracted Rate Rate Not on File Short-Pay Balance Due International Trade Lanes Trans-Pacific Trans-Atlantic Carrier Overcharge Recovery Composite Key (Carrier|Lane|Mode) Per CBM Pricing Per KG Pricing

Download the workbook

Open it, change a rate in the Rate Table, and watch the Dashboard update in real time.

⚠ Replace download link with your hosted file URL once uploaded