Calculadora COMEX Perú

Home / Supply chain, technology and AI / Module 4

4.3 AI in spreadsheets: inventories, orders and warehouses

AI can write formulas, clean data and suggest orders in your spreadsheet. Learn to use it for inventories with a simple rule: AI for structure and text, formulas for numbers, and you to check.

Module 4: AI applied to logistics, no coding needed · Reviewed on 12/10/2026 · Español

Goal: Use AI in a spreadsheet by asking it for formulas, classify products with ABC and calculate the reorder point, coverage and suggested order.

Many companies manage inventories and orders in a spreadsheet, such as Excel or Google Sheets. AI comes in three ways: as a chat that explains and writes formulas, as an assistant that analyzes a file you upload, or as a function inside a cell that classifies or summarizes text. All three help, but they are not equally useful for everything.

The practical rule is this: AI for text and structure, formulas for numbers. Ask it for the formula, not the result. That way the calculation stays in your spreadsheet, visible and repeatable. A figure given by a chat leaves no trail; a formula does. On its support page, Microsoft warns that Excel's COPILOT function can give incorrect answers, and different answers with the same data, and it recommends native formulas for calculations.

Before using AI, clean up the spreadsheet: clear headers, one row per record, no merged cells and codes stored as text. A classic detail: if a code starts with zero, such as tariff heading 0901.11, Excel may drop the zero by treating the code as a number. Work on a copy of the file and do not paste customer data or agreed prices without authorization.

In inventories, a few calculations hold most of the value. ABC classification ranks products by their annual consumption value: a few (class A) account for most of the value and deserve more control; the lower-value ones (class C) are managed with simple rules. Coverage is the number of days your stock lasts: stock ÷ daily demand. The reorder point is the stock level that triggers an order: daily demand × lead time + safety stock, which is the cushion for changes in demand or lead time.

Always check what the AI did. Count the rows before and after, compare total units and total soles, review 10 random rows and recalculate two products by hand. Also ask it to explain each formula and to look for odd cases, such as negative stock or lead times of zero. In the warehouse it may suggest placing the fastest-moving products near the exit, but you are the one who knows the physical constraints (weight, height, cold chain).

Key ideas

TaskHow AI helpsCheck in the spreadsheet
Clean dataUnify product names, split columns, flag duplicatesCount rows before and after
ABC classificationSuggest the formulas for cumulative percentage and classThat the sum is 100% and A + B + C equals the total number of products
RestockingWrite the formula for the reorder point and coverageRecalculate two products by hand
Suggested ordersBuild the order table by supplierCheck minimum order quantities and pack multiples
WarehouseSuggest locations based on turnoverCompare against weight, height and cold chain

Worked example

ABC classification and a suggested order in a spreadsheet
  1. Comercial Costa Verde S.A.C. (a fictional company from Lima) tracks 10 products in Excel and wants to prioritize its control. You sort them from highest to lowest by annual consumption value (S/): 380,000; 250,000; 120,000; 80,000; 50,000; 40,000; 30,000; 22,000; 16,000 and 12,000. You save a copy of the original file.
  2. You ask the AI for the formula, not the result: “I have the annual value in column B, from row 2 to row 11. Give me formulas for percentage of total, cumulative percentage and class: A up to 80%, B up to 95% and C the rest.” You apply the ones it gives you: percentage =B2/SUM(B$2:B$11) and class =IF(D2<=0.8,"A",IF(D2<=0.95,"B","C")).
  3. Check the sum: 380 + 250 + 120 + 80 + 50 + 40 + 30 + 22 + 16 + 12 = 1,000 (in thousands), that is, S/ 1,000,000. The cumulative percentages are 38%, 63%, 75%, 83%, 88%, 92%, 95%, 97.2%, 98.8% and 100%.
  4. Review the classes. A is the first three (cumulative 75%). B is the next four, up to 95%. C is the last three. Check the value: B = 80 + 50 + 40 + 30 = 200 thousand (20%); C = 22 + 16 + 12 = 50 thousand (5%). A + B + C = 750 + 200 + 50 = 1,000 thousand. Three products (30%) hold 75% of the value.
  5. Take the first product, which is class A. It costs S/ 40 per unit: 380,000 ÷ 40 = 9,500 units a year. With 250 operating days, daily demand is 9,500 ÷ 250 = 38 units.
  6. Calculate the reorder point. The supplier delivers in 10 days and your policy is 4 days of safety stock. Consumption during the lead time: 38 × 10 = 380. Safety stock: 38 × 4 = 152. Reorder point = 380 + 152 = 532 units.
  7. Compare with the current stock of 500 units. Since 500 is less than 532, it is time to order. Coverage is 500 ÷ 38 = 13.2 days. If your maximum level is to cover 25 days, that is 38 × 25 = 950 units, and the suggested order is 950 − 500 = 450 units. You still need to check the supplier's minimum order quantity.
  8. Try a scenario: if the lead time rises to 15 days, the reorder point would be 38 × 15 + 152 = 722. With 500 units you would be 222 below it. That is why A products are reviewed every week.

Result: The AI wrote the formulas, but the numbers come from your spreadsheet and you checked them: S/ 1,000,000 in total, three A products with 75% of the value and a suggested order of 450 units for the main product.

Real cases

Microsoft limits the use of Excel's AI function for calculations

2025

Excel's COPILOT function lets you ask AI, from a cell, to do tasks such as summarizing or classifying text and generating sample data. Microsoft's official support page warns that it can give incorrect answers and that results can change even with the same arguments. It recommends using native formulas, such as SUM, AVERAGE or IF, for calculations, and not using AI results in financial reports. It matters because the company itself sets the limit.

Use the in-cell AI to classify or summarize text, and regular formulas for quantities and costs.

Source: Microsoft Soporte – Función COPILOT de Excel

15,841 COVID-19 cases were left out of Public Health England's daily figures

04/10/2020

On 04/10/2020, Public Health England reported that 15,841 positive COVID-19 cases, which occurred between 25/09/2020 and 02/10/2020, had not been included in the published daily figures. The cause was a failure in the automated process that transfers lab results to the data dashboards: some files exceeded the maximum size the upload system allowed. It matters because for several days the daily figures underestimated the real number of cases.

Every time you move data between files or systems, compare the number of records and the totals before and after.

Source: GOV.UK – PHE statement on delayed reporting of COVID-19 cases

Common mistakes

Practise with the calculators, the COMEX Simulator and the review questions on the main page.

Open this topic in the calculator →
← Previous topic: Logistics diagnosis with conversational AINext topic: Comparing transport providers with AI →