Sunteți pe pagina 1din 8

Excel -- Create an Order Form

(http://www.contextures.com/index.html)

http://www.contextures.com/xlOrderForm01.html

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.

Convert From Doc to PDF, PDF to Doc Simply With The Free On-line App!

Set up the Workbook
Create the Product List
Create a Data Validation Dropdown List
Calculate the Row Total
Total the Order
Format the Order Form

Two worksheets are required in this workbook.

1. Delete all sheets except Sheet1 and Sheet2

2. Rename Sheet1 as Order Form

3. Rename Sheet2 as Products

1. On the Products sheet, type the list of products and prices, as shown below

Excel -- Create an Order Form

.

http://www.contextures.com/xlOrderForm01.html

2. Select the list of products in cells A2:A6

3. Name the range ProductList (there are Naming instructions here: Name a Range

(http://www.contextures.com/xlNames01.html#NameBox))

4. Select the list of products and prices in cells A2:B6

5. 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 (xlDataVal01.html)

1. On the Order Form worksheet, select cells B5:B12

2. Choose Data | Validation

3. From the Allow dropdown, choose List

4. In the Source box, type:

5. Click the OK button

=ProductList

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

(xlFunctions02.html)

1. On the Order Form worksheet, select cells C5:C12

Excel -- Create an Order Form

2. Type the formula:

=IF(B5="","",VLOOKUP(B5,ProductLookup,2,FALSE))

3. Press Ctrl + Enter, to enter the formula in all the selected cells.

http://www.contextures.com/xlOrderForm01.html

Quantity will be entered in column D, and the row total calculated in column E. The formula is wrapped with an IF formula, to prevent a zero calculation if no product has been selected in a row.

1. On the Order Form worksheet, select cells E5:E12

2. Type the formula:

3. Press Ctrl + Enter, to enter the formula in all the selected cells.

=IF(C5="","",C5*D5)

The SUM function is used to total all the rows in the Order Form.

1. On the Order Form worksheet, select cell E14

2. Type the formula:

3. Press Enter, to complete the formula.

=SUM(E5:E12)

Add cell borders and font formatting, to make the Order Form more attractive, and easy to use.

1. On the Order Form worksheet, add column headings in row 4, as shown at right.

3. In cell C14, type "Total"

4. In cell E2, type the formula:

5. Select cells B4:E12, and add borders.

6. Add fill colour to columns B and D, where data entry is required.

7. Format the heading fonts as bold

8. Format the date as desired.

=TODAY()

Excel -- Create an Order Form

http://www.contextures.com/xlOrderForm01.html

To enhance the order form, you can add a worksheet with customer names and addresses. Then, select a customer name on the order form, and have their address fill in automatically.

1. Insert a new worksheet, and name it Customers

2. On the Customers sheet, in row 1, and the headings, Name, Street, City, Prov, PostalCode, DateEntered.

3. In the following rows, enter data for a few sample customers.

4. To name the customer list (for the dropdown list), select cell A2

5. Choose Insert | Name | Define

6. Type the name: CustList

7. In the Refers to box, type:

=OFFSET(Customers!\$A\$2,0,0,COUNTA(Customers!\$A:\$A)-1,1)

9. To name the Customer lookup table (for the address lookup), type the name: CustLookup

10. In the Refers to box, type:

=OFFSET(CustList,,,,6)

11. Click OK

1. On the Order Form worksheet, select rows 3:7

2. Choose Insert | Rows

3. In cell B4, type: Ship to:

Excel -- Create an Order Form

http://www.contextures.com/xlOrderForm01.html

4. In cell B5, add a Data Validation list, with CustList as the source

5. Select cells B6:E6, and choose Format | Cells

6. On the Alignment tab, add a check mark to the Merge Cells box, click OK

7. Select cells B7:E7, and press the F4 key, to repeat the previous formatting

8. In cell B6, type the formula:

=IF(B5="","",VLOOKUP(B5,CustLookup,2,FALSE))

9. 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)) 10. To test the formulas, select a customer from the dropdown list in cell B5, and the address should appear in B6 and B7.

Search
Custom Search
Worksheet Data Entry Form (http://www.contextures.com/xlForm02.html)
Create a Drop Down List (http://www.contextures.com/xlDataVal01.html)
VLOOKUP Function (http://www.contextures.com/xlFunctions02.html)
Named Ranges (http://www.contextures.com/xlNames01.html)

Excel -- Create an Order Form

http://www.contextures.com/xlOrderForm01.html

(30excelfunctionsin30days01.html)

Excel -- Create an Order Form

http://www.contextures.com/xlOrderForm01.html

Excel -- Create an Order Form

http://www.contextures.com/xlOrderForm01.html