How to Check Customer Shelf Life at Delivery in Excel
A warehouse can have 180 units on hand and still be 30 short on two orders totaling 120. That can happen when customers specify how much shelf life must remain at delivery and both orders need some of the same stock.
Dynamics 365 Supply Chain Management calls this a sellable-days rule. Microsoft documents using the confirmed receipt date when available and the requested receipt date otherwise. A Dynamics practitioner also describes how often customers want different minimums. If your warehouse system already applies these rules, use it for live reservations. The Excel check below is for investigating why a reservation or stock report looks wrong. Microsoft’s sellable-days documentation · Practitioner walkthrough in Spanish.
Start with the arrival date
Use one row per open order line with its SKU, warehouse, demand, arrival date and customer minimum in calendar days. Pull one row per lot in the same SKU and warehouse with expiration, physical quantity, existing reservations and release status. Use data from the same snapshot. If the export already reports available stock net of reservations, use that field directly. Here, expiry minus arrival must be at least the minimum, so equality qualifies.
Copy the synthetic order and lot data
This example uses fictional customer orders for sealed packs of one SKU, SOAP, in one warehouse. Paste or import each CSV into a separate sheet and set ship, arrival and expiry fields to Excel dates. Leave the two missing values blank.
Order,Quantity,Ship,Arrival,MinimumDays
O1,70,2026-11-22,2026-11-24,10
O2,50,2026-11-22,2026-11-24,3
O3,30,2026-11-22,2026-11-24,
Lot,OnHand,Reserved,Expiry,Status
L0,20,0,2026-11-25,Released
L1,60,20,2026-11-28,Released
L2,50,0,2026-12-04,Released
L3,30,0,2026-12-10,Hold
L4,20,0,,Released
Check each order against each lot
Make a third sheet with one row per order and lot pair. For multiple SKUs or warehouses, pair rows only within the same SKU and warehouse. In columns A through H put Order, Lot, Arrival, MinimumDays, OnHand, Reserved, Expiry and Status. For this example, use 15 pair rows. If you link to a blank minimum or expiry with a formula, return an empty string for that blank so Excel does not turn it into a zero.
Put the reason in I2 and the eligible quantity in J2, then copy both down. Existing reservations above on-hand stock go to review.
=IF(NOT(ISNUMBER(D2)),"Review customer rule",IF(H2<>"Released","Review lot status",IF(OR(NOT(ISNUMBER(C2)),NOT(ISNUMBER(G2))),"Review dates",IF(F2>E2,"Review stock",IF(G2-C2>=D2,"Eligible","Too short at arrival")))))
=IF(I2="Eligible",E2-F2,0)
For O1, only L2 meets the 10-day minimum, leaving 50 eligible units. For O2, L1 and L2 give 90 units when considered alone. L0 has three days left at dispatch and only one at arrival, so it fails O2’s three-day requirement. L3 is on hold, L4 needs a verified expiry, and O3 needs its customer rule confirmed. An explicit zero-day rule can be evaluated. A blank rule needs review.
Count each lot’s available units once
Use one row per allocation with an order ID, lot ID and quantity. Sum by lot and compare with unreserved units. Sum by order and compare with demand. Each allocated pair must be eligible. When you need to optimize a larger allocation in Excel, set the Solver objective to maximize total allocated units, with nonnegative integer quantities, ineligible pairs set to zero, and limits for each lot and each order.
Allocate 50 packs from L2 to O1 and 40 from L1 to O2. O1 is 20 short and O2 is 10 short. L1 and L2 are the only lots that qualify for either known-rule order, and together they provide 90 distinct units, so this allocation reaches the maximum. Adding the standalone figures of 50 and 90 would count L2’s 50 packs twice. The remaining 30-unit order, O3, stays outside the 120-unit comparison until its rule is known.
Trace an unexpected shortage to the export
In Jolene.pro, you can ask questions about an Excel workbook containing the order, lot and allocation tables. Ask it to show which rows support each proposed allocation, explain any lot that passed at dispatch but failed at arrival, and list the orders that need a missing rule or a date confirmed. Compare those row references with the exports before acting on the result. In this example, start with the receipt date for O2, L0’s expiry and L2’s allocation rows. A live Jolene.pro result was not verified for this example.
If your shipment records lack lot IDs in the first place, see how to reconcile stock when a shipment is missing its lot ID.