Delivery tracker in Excel: status and late flag
A delivery tracker in Excel is one row per shipment. The columns that answer where the parcel is are the tracking number, the destination, the promised date, the actual date, and the status. The late flag is a test. If the actual date is filled and it is after the promised date, the row is late. If the actual date is empty and today is after the promised date, the shipment is still open and already late. IF runs that test on every row. COUNTIF then counts the rows in each status, so the total in transit, delivered, or late is a number you can point at. Use the same status words on every row. A dropdown is what keeps Delivered, In transit, and Late from splitting into spellings that COUNTIF will not count together. Days in transit are the actual date minus the ship date, or today minus the ship date when the actual date is still empty. The steps below build that sheet: the columns, the days in transit, the status, the late count, and a filter on carrier and destination. Elyx can add those columns to the list you already keep. You still type the dates. The trial lasts 7 days, with no card. When a flag looks wrong, check the cell before the formula. Sort the column the formula reads and look for blanks and for words that are not in the dropdown. A blank is invisible to COUNTIF and COUNTIFS. A date stored as text does not compare with a real date, so a late flag or a days count stays empty. Correct the cell, then read the flag again. Leave finished rows on the sheet. They are the history you divide by when you count a period. Deleting them to tidy the file removes that base. Filter them out of the view instead. If you open a new month, copy the sheet and name the old one with the month. The formulas stay as they are. Before you send the total, read three rows against the source you typed from. If those three match, the total is the total of this sheet. Pick the rows yourself. A formula that is right on the row you already calculated by hand is the one to copy down. Write the unit in the header: days, hours, or pieces. A number without a unit gets divided by the wrong base later. If two people maintain the sheet, the dropdown is the agreement on the words. Change the list in one place, not the cells one by one. Keep the source column next to the formula column so the check does not mean opening another file.
The Problem
Tracking numbers live in a carrier email, a portal, and a sheet copied from last month. When someone asks where a shipment is, the open file is often the wrong one. A row that never received an actual date stays quiet, so the late shipments show up when the customer calls. Put every shipment on one sheet and keep one list of status words. The promised date and the actual date sit in their own columns. The late flag reads those two cells. It does not call the carrier, and it does not invent an arrival time.
Benefits
Every shipment is one row, with the tracking number, the destination, the promised date, the actual date, and the status in their own columns.
IF writes Late when the actual date is after the promise, or when the actual date is empty and today is already past the promise.
COUNTIF totals each status from the dropdown words, so the count matches the rows you can filter.
A filter on destination or carrier shows the open rows and leaves the delivered history on the sheet.
Days in transit are a subtraction of the two dates you typed. The sheet does not read a carrier portal.
Step-by-Step Tutorial
Create the table structure
Open a new Excel workbook and create column headers for your delivery tracking system. You'll need columns for tracking number, customer name, origin, destination, shipment date, expected delivery date, actual delivery date, status, and notes. This foundation will organize all your logistics data in one place.
Use Ctrl+T to convert your data range into a structured table, which automatically enables filtering and makes formulas more readable with column references.
Add sample delivery data
Populate your template with realistic logistics data. Enter tracking numbers (TRK001, TRK002, etc.), customer names, cities, dates in MM/DD/YYYY format, and current status values (Pending, In Transit, Delivered, Delayed). This sample data will help you test your formulas and understand the template's functionality.
Use consistent date formatting by right-clicking cells and selecting 'Format Cells' > 'Date' to ensure DATEDIF calculations work correctly.
Calculate days in transit
Create a formula to automatically calculate how many days a shipment has been in transit. This metric helps you identify slow-moving deliveries and monitor operational efficiency. Use DATEDIF to find the difference between shipment date and current date (or actual delivery date if already delivered).
=DATEDIF(D2,TODAY(),"D")For delivered shipments, use an IF statement to calculate days between shipment and actual delivery instead: =IF(F2="",DATEDIF(D2,TODAY(),"D"),DATEDIF(D2,E2,"D"))
Determine delivery status with conditional logic
Create a formula that automatically updates delivery status based on dates. This eliminates manual status updates and reduces errors. The formula will check if the shipment is on time, overdue, or still pending based on comparing actual delivery date with expected delivery date.
=IF(F2="",IF(TODAY()>E2,"Delayed","In Transit"),IF(F2>E2,"Delayed","Delivered"))Place this formula in your Status column (column H) and it will automatically categorize each shipment without manual intervention.
Calculate days overdue for late deliveries
Add a formula to calculate how many days a delivery is overdue. This helps prioritize follow-ups and identify problematic routes or carriers. Only display overdue days for shipments that have exceeded their expected delivery date.
=IF(F2="",IF(TODAY()>E2,DATEDIF(E2,TODAY(),"D"),0),IF(F2>E2,DATEDIF(E2,F2,"D"),0))Format this column with conditional formatting (red background for values > 0) to instantly spot overdue deliveries at a glance.
Count shipments by status
Create summary statistics using COUNTIF to track how many shipments fall into each category (Delivered, In Transit, Delayed, Pending). Place these summary formulas in a separate area below your main table to create a quick performance dashboard.
=COUNTIF(H:H,"Delivered")Create a summary section with formulas like: Delivered: =COUNTIF(H:H,"Delivered"), In Transit: =COUNTIF(H:H,"In Transit"), Delayed: =COUNTIF(H:H,"Delayed")
Calculate on-time delivery percentage
Build a KPI formula to measure your logistics performance. Calculate the percentage of deliveries completed on or before the expected delivery date. This metric is crucial for monitoring service quality and identifying improvement areas.
=COUNTIF(H:H,"Delivered")/COUNTA(H:H)*100For a more accurate on-time percentage, use: =COUNTIF(H:H,"Delivered")/COUNTIF(H:H,"<>In Transit")*100 to exclude pending shipments from the calculation.
Add conditional formatting for visual alerts
Apply conditional formatting rules to highlight critical information visually. Color-code status cells (green for delivered, yellow for in transit, red for delayed) and highlight overdue shipments. This makes it easy to spot issues without reading every cell.
Select your Status column, go to Home > Conditional Formatting > New Rule, and use formulas like =H2="Delayed" with red fill to automatically highlight problem shipments.
Create a filter-enabled tracking dashboard
Enable AutoFilter on your main table to allow logistics managers to quickly filter by status, destination, or date range. Add slicers for interactive filtering of Status and Expected Delivery Date columns to create a dynamic dashboard experience.
Select your table, go to Data > Filter, then use Data > Slicer to create visual filter buttons for Status and Destination, this makes it easy to view only delayed shipments or specific regions.
Build a carrier performance summary
Create a summary that groups shipments by the carrier name you typed and calculates average transit days and the late count for that name.
=AVERAGEIF(Carrier:Carrier,"Carrier A",TransitDays) and =COUNTIFS(Carrier:Carrier,"Carrier A",Status:Status,"Delayed")/COUNTIF(Carrier:Carrier,"Carrier A")Create a separate summary table with carrier names and use AVERAGEIF and COUNTIFS to automatically calculate metrics for each carrier, this data drives vendor performance reviews.
Template Features
Real-time Delivery Status Dashboard
Centralized view showing delivery progress with color-coded status indicators (On Time, At Risk, Delayed). Solves the problem of scattered information across multiple sources.
=IF(TODAY()>E2,"DELAYED",IF(TODAY()=E2,"TODAY","ON TRACK"))Automated ETA Calculations
Automatically calculates estimated arrival dates based on shipment origin, destination, and carrier transit times. Eliminates manual date entry errors and improves customer communication accuracy.
=B2+VLOOKUP(C2,CarrierTable,3,FALSE)KPI Summary Section
Tracks critical logistics metrics including on-time delivery rate, average transit time, and pending deliveries. Provides instant visibility into operational performance.
=COUNTIF(Status:Status,"ON TIME")/COUNTA(Status:Status)*100Conditional Alerts for Delayed Shipments
Automatically flags shipments that exceed expected delivery windows with visual highlighting. Enables proactive intervention before customer complaints arise.
=IF(AND(E2<TODAY(),F2="In Transit"),"ALERT","")Multi-filter Pivot Summary
Quickly segment deliveries by carrier, destination region, or customer priority level. Solves the problem of analyzing large shipment volumes by relevant business dimensions.
Cost Analysis by Route
Divides the costs you typed by the number of deliveries on that route. The result is the average of those rows, not a market price.
=SUMIF(Route:Route,A2,Cost:Cost)/COUNTIF(Route:Route,A2)Concrete Examples
Real-time Fleet Delivery Performance Monitoring
James, a Logistics Manager at a third-party logistics (3PL) provider, needs to monitor 15 active delivery routes across the city. He uses the Delivery Tracking template to identify bottlenecks and optimize driver assignments for the next day.
Route A (Driver: Mike) - 8 deliveries, 6 completed, 2 delayed (traffic); Route B (Driver: Sarah) - 10 deliveries, 10 completed on time; Route C (Driver: Tom) - 7 deliveries, 5 completed, 2 pending (customer unavailable)
Result: COUNTIF returns the completed rows and the delayed rows for each route you typed. Filter to the delayed rows to read the reason on those lines. The average transit time is the average of the day counts on that route.
Customer SLA Compliance Reporting
You track promised and actual dates for the orders you shipped that week. The on-time share is the on-time rows divided by the rows in that week. You choose what on-time means: actual date on or before the promised date.
Week 1: 187 rows on time, 13 rows late. Week 2: 194 on time, 6 late. Week 3: 189 on time, 11 late. Each late row keeps the reason you typed.
Result: The on-time count divided by the week count is the share for that week on this sheet. It moves when you add rows. It is not a target the sheet invents, and it is not a carrier score.
Late count by carrier name
You have one row per shipment and a carrier name you typed. You want the late count next to the shipment count for each name, from the dates on the sheet.
Carrier A: 40 shipments, 3 with actual date after the promise. Carrier B: 28 shipments, 6 late on the same test. Carrier C: 15 shipments, actual date still empty on 2 rows whose promise is already past.
Result: COUNTIFS returns the late count for each carrier name. The late count divided by the shipment count is the share of that name on your sheet. It is a count of your rows, not a published carrier score.
Pro Tips
Create conditional alerts with formula-based highlighting
Use conditional formatting with formulas to instantly flag delayed shipments or exceptions. Apply a formula like =OR(TODAY()-A2>B2, C2="On Hold") to highlight rows where delivery is overdue or status is problematic. This eliminates manual review and keeps critical issues visible at a glance. Pair with data bars to visualize delivery progress percentages.
=OR(TODAY()-A2>B2, C2="On Hold")Build a pivot table dashboard for KPI tracking
Create a pivot table from your tracking data (Ctrl+A → Insert → Pivot Table) to instantly summarize metrics by carrier, destination, or status. Add slicers (Insert → Slicer) to filter by date range or region dynamically. This gives you real-time visibility into on-time delivery rates, average transit times, and carrier performance without manual calculations.
Use XLOOKUP for multi-criteria shipment matching
Replace VLOOKUP with XLOOKUP to match shipment details across multiple sheets by tracking number AND date. Formula: =XLOOKUP(A2&B2, Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100, Sheet2!$C$2:$C$100, "Not Found"). This prevents duplicate matches and handles missing data gracefully, critical when managing high-volume shipments.
=XLOOKUP(A2&B2, Sheet2!$A$2:$A$100&Sheet2!$B$2:$B$100, Sheet2!$C$2:$C$100, "Not Found")Automate status updates with Power Query refresh
Connect your tracking spreadsheet to live data sources via Power Query (Data → Get Data → From Web/Database). Set up automatic refresh intervals to pull carrier updates without manual entry. Use Ctrl+Shift+R to refresh all queries at once. This eliminates data entry errors and ensures your dashboard always reflects current shipment status.