A purchase order template in Excel should number itself, fill in the supplier details, price every item and warn you before a large order goes out. In this tutorial you build one with formulas only. The example is Bayside Bistro Group, a fictional group of three restaurants in San Diego, California.

⬇️ Download the Free Practice File
Practice file + solution workbook · .zip · Microsoft 365 or Excel 2021
Watch the Video Tutorial
Video Overview
The video shows the finished purchase order first and changes one quantity to turn the approval box from red to green. Then you start from the practice file and build it step by step: the automatic PO number, two dropdown lists, vendor details with XLOOKUP, the item lines, totals, the approval check and a small open orders panel.
What Is in the Practice File?
There are three Excel tables: tblPO (a log of 48 earlier orders), tblVendors (8 suppliers) and tblItems (12 items). The Purchase Order sheet has the form with the item codes, quantities, shipping of $185, a 7.75% sales tax rate and a $5,000 approval limit. The tax rate and limit are examples, so use your own.

Step 1: Automatic PO Number
=MAX(tblPO[PO No])+1
The log ends at 2648, so the result is 2649. Apply the custom number format below to show PO-2649.
"PO-"0

Step 2: Dropdown Lists
Choose Data Validation, allow List, and use this source for the vendor cell C9.
=Vendors!$B$5:$B$12
Use this source for the item code cells B15 to B22.
=Items!$B$5:$B$16

Step 3: Vendor Details with XLOOKUP
=XLOOKUP($C$9,tblVendors[Vendor],tblVendors[Address])
=XLOOKUP($C$9,tblVendors[Vendor],tblVendors[City / State])
=XLOOKUP($C$9,tblVendors[Vendor],tblVendors[Email])
=XLOOKUP($C$9,tblVendors[Vendor],tblVendors[Terms])
=XLOOKUP($C$9,tblVendors[Vendor],tblVendors[Contact])
The delivery date is the PO date plus the supplier lead days.
=F8+XLOOKUP($C$9,tblVendors[Vendor],tblVendors[Lead Days])

Step 4: Item Lines
Type these in row 15 and fill down to row 22.
=IF($B15="","",XLOOKUP($B15,tblItems[Item Code],tblItems[Description]))
=IF($B15="","",XLOOKUP($B15,tblItems[Item Code],tblItems[Unit]))
=IF($B15="","",XLOOKUP($B15,tblItems[Item Code],tblItems[Unit Price]))
=IF($B15="","",E15*F15)

Step 5: Subtotal, Tax and Total
=SUM(G15:G22)
=ROUND(G24*E26,2)
=G24+G25+G26
The subtotal is $4,500.30, shipping is $185.00, tax is $348.77 and the total is $5,034.07.

Step 6: Approval Check
=IF(G27>C24,"NEEDS MANAGER APPROVAL","OK TO SEND")
Add two conditional formatting rules to the merged box: green for the first and red for the second.
=$B$25="OK TO SEND"
=$B$25="NEEDS MANAGER APPROVAL"

Step 7: Open Orders Panel
Open orders, open value, overdue orders and the open amount with the selected vendor:
=COUNTIFS(tblPO[Status],"Open")
=SUMIFS(tblPO[Total],tblPO[Status],"Open")
=COUNTIFS(tblPO[Status],"Open",tblPO[Due Date],"<"&F8)
=SUMIFS(tblPO[Total],tblPO[Vendor],C9,tblPO[Status],"Open")
The log shows 7 open orders worth $17,828, 2 of them overdue, and $1,303 open with this supplier.

The Real Test
The chef says 36 jugs of fryer oil are enough instead of 48. Change that one quantity. The total drops to $4,428.95, below the limit, and the box turns green.

Typed Purchase Order or This Template?
| Task | Typed by hand | This template |
|---|---|---|
| PO number | Can repeat | Next number from the log |
| Supplier details | Copied each time | Filled by XLOOKUP |
| Prices | May be old | From the item list |
| Large orders | Easy to miss | Red approval box |
Download the Free Practice File
The zip holds the practice workbook and the finished solution.
⬇️ Download the Free Practice File
Practice file + solution workbook · .zip · Microsoft 365 or Excel 2021
Need Quotes and Invoices Too?
See the ready-made Quotation and Invoice Template in Excel and Google Sheets from Next Gen Templates. To make a workbook save records and create PDFs with one click, join Excel VBA Basics with AI. Code PKEE-VBA20 gives 20% off, valid till December 31, 2026. Microsoft’s XLOOKUP documentation lists every argument.
Related Tutorials
- Bill of Materials Template in Excel
- Bank Reconciliation in Excel
- Accounts Payable Aging Report in Excel
Frequently Asked Questions
How do I create an automatic PO number in Excel?
Keep the numbers in a PO log table and use MAX on the number column plus 1. Show the PO- prefix with a custom number format, so the value stays a number.
Why does my PO number formula stop working?
It usually happens when numbers are typed as text such as PO-2649. MAX ignores text. Type only the number and let the number format add the prefix.
How do I fill vendor details from a dropdown?
Add a Data Validation list for the vendor name, then use XLOOKUP to return the address, email, terms and contact from the vendor table.
How do I keep empty item lines blank?
Wrap each lookup in IF so that an empty item code returns an empty string instead of an error.
Can this purchase order save itself to the log?
Not with formulas only. Saving a line to the log and creating a PDF with one click needs a macro.
Which Excel version do I need?
XLOOKUP needs Microsoft 365 or Excel 2021 or later.
By PK, An Excel Expert. Bayside Bistro Group and all names and numbers are fictional example data for learning.
Conclusion
MAX numbers the order, XLOOKUP fills in the supplier and the items, one IF checks the approval limit, and COUNTIFS with SUMIFS keeps the open orders in view.



