Home>Blogs>Excel Tips and Tricks>Purchase Order Template in Excel: Auto PO Number and Totals
Excel Tips and Tricks

Purchase Order Template in Excel: Auto PO Number and Totals

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.

Purchase order template in Excel showing needs manager approval
The finished purchase order: PO-2649, total $5,034.07, approval needed.

⬇️  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.

Empty purchase order form in the Excel practice file
The practice file before any formula.

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

Automatic PO number in Excel using MAX
The PO number comes from the log.

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

Data Validation dropdown list for item codes
Item codes come from the item list.

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])

XLOOKUP formula for the delivery date
Deliver By is the PO date plus 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)

Item lines with description, unit price and line total
Descriptions, prices and line totals fill in.

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.

Purchase order subtotal, shipping, sales tax and total formulas
The total formula.

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"

Approval check box in an Excel purchase order
Orders above the limit need 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.

COUNTIFS and SUMIFS open purchase orders panel
The panel reads the PO log.

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.

Purchase order ok to send after changing the quantity
OK to send at $4,428.95.

Typed Purchase Order or This Template?

TaskTyped by handThis template
PO numberCan repeatNext number from the log
Supplier detailsCopied each timeFilled by XLOOKUP
PricesMay be oldFrom the item list
Large ordersEasy to missRed 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

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.

PK
Meet PK, the founder of PK-AnExcelExpert.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your Excel skills to the next level!
https://www.pk-anexcelexpert.com