![]()
Excel -- Create an Order Form
In this order form, Data Validation is used to create a dropdown list of available products. In adjacent cells, VLookup formulas return the price of the selected products.Two worksheets are required in this workbook.
- Delete all sheets except Sheet1 and Sheet2
- Rename Sheet1 as Order Form
- Rename Sheet2 as Products
- On the Products sheet, type the list of products and prices, as shown at right.
- Select the list of products in cells A2:A6
- Name the range ProductList (there are Naming instructions here: Name a Range)
- Select the list of products and prices in cells A2:B6
- Name the range ProductLookup.
![]()
The next step is to create the data validation dropdown lists, to make it easy to enter a product in the order form. There are detailed instructions here: Data Validation -- Introduction
Create a Data Validation Dropdown List
- On the Order Form worksheet, select cells B5:B12
- Choose Data | Validation
- From the Allow dropdown, choose List
- In the Source box, type: =ProductList
- Click the OK button
![]()
![]()
VLookup formulas in column C will return the price for each product selected in the order form. The VLookup formula is wrapped with an IF formula, to prevent errors if no product has been selected in a row. For more information on the VLookup formula, see Worksheet Functions -- VLookup
Total the OrderThe SUM function is used to total all the rows in the Order Form.
- On the Order Form worksheet, select cell E14
- Type the formula: =SUM(E5:E12)
- Press Enter, to complete the formula.
Create the Customer Dropdown and Lookup
- On the Order Form worksheet, select rows 3:7
- Choose Insert | Rows
- In cell B4, type: Ship to:
- In cell B5, add a Data Validation list, with CustList as the source
- Select cells B6:E6, and choose Format | Cells
- On the Alignment tab, add a check mark to the Merge Cells box, click OK
- Select cells B7:E7, and press the F4 key, to repeat the previous formatting
- In cell B6, type the formula:
=IF(B5="","",VLOOKUP(B5,CustLookup,2,FALSE))- In cell B7, type the formula that will lookup city, province, and postal code:
=IF(B5="","",VLOOKUP(B5,CustLookup,3,FALSE)&", " &VLOOKUP(B5,CustLookup,4,FALSE)&" " &VLOOKUP(B5,CustLookup,5,FALSE))- To test the formulas, select a customer from the dropdown list in cell B5, and the address should appear in B6 and B7.
![]()
Download the zipped sample file
Last updated: July 18, 2008 11:44 PM