Excel Functions
You can use Excel functions to perform mathematical calculations. This Microsoft Excel tutorial teaches you how to create and use Excel functions. It takes you step-by-step through the process.
Table of Contents |
Lesson 3: Creating Excel Functions, Filling Cells, and Printing
By using functions, you can quickly and easily make many useful calculations, such as finding an average, the highest number, the lowest number, and a count of the number of items in a list. Microsoft Excel has many functions that you can use.Using Reference Operators
To use functions, you need to understand reference operators. Reference operators refer to a cell or a group of cells. There are two types of reference operators: range andunion.A range reference refers to all the cells between and including the reference. A range reference consists of two cell addresses separated by a colon. The reference A1:A3 includes cells A1, A2, and A3. The reference A1:C3 includes cells A1, A2, A3, B1, B2, B3, C1, C2, and C3.
A union reference includes two or more references. A union reference consists of two or more numbers, range references, or cell addresses separated by a comma. The reference A7,B8:B10,C9,10 refers to cells A7, B8 to B10, C9 and the number 10.
Understanding Functions
Functions are prewritten formulas. Functions differ from regular formulas in that you supply the value but not the operators, such as +, -, *, or /. For example, you can use the SUM function to add. When using a function, remember the following:Use an equal sign to begin a formula.Here is an example of a function:
Specify the function name.
Enclose arguments within parentheses. Arguments are values on which you want to perform the calculation. For example, arguments specify the numbers or cells you want to add.
Use a comma to separate arguments.
=SUM(2,13,A1,B2:C7)In this function:
The equal sign begins the function.After you type the first letter of a function name, the AutoComplete list appears. You can double-click on an item in the AutoComplete list to complete your entry quickly. Excel will complete the function name and enter the first parenthesis.
SUM is the name of the function.
2, 13, A1, and B2:C7 are the arguments.
Parentheses enclose the arguments.
Commas separate the arguments.
EXERCISE 1
Functions
The SUM function adds argument values.- Open Microsoft Excel.
- Type 12 in cell B1.
- Press Enter.
- Type 27 in cell B2.
- Press Enter.
- Type 24 in cell B3.
- Press Enter.
- Type =SUM(B1:B3) in cell A4.
- Press Enter. The sum of cells B1 to B3, which is 63, appears.
Alternate Method: Enter a Function with the Ribbon
- Type 150 in cell C1.
- Press Enter.
- Type 85 in cell C2.
- Press Enter.
- Type 65 in cell C3.
- Choose the Formulas tab.
- Click the Insert Function button. The Insert Function dialog box appears.
- Choose Math & Trig in the Or Select A Category box.
- Click Sum in the Select A Function box.
- Click OK. The Function Arguments dialog box appears.
- Type C1:C3 in the Number1 field, if it does not automatically appear.
- Click OK. The sum of cells C1 to C3, which is 300, appears.
Format worksheet
- Move to cell A4.
- Type the word Sum.
- Select cells B4 to C4.
- Choose the Home tab.
- Click the down arrow next to the Borders button .
- Click Top and Double Bottom Border.
Calculate an Average
You can use the AVERAGE function to calculate the average of a series of numbers.- Move to cell A6.
- Type Average. Press the right arrow key to move to cell B6.
- Type =AVERAGE(B1:B3).
- Press Enter. The average of cells B1 to B3, which is 21, appears.
Calculate an Average with the AutoSum Button
In Microsoft Excel, you can use the AutoSum button to calculate an average.- Move to cell C6.
- Choose the Home tab.
- Click the down arrow next to the AutoSum button .
- Click Average.
- Select cells C1 to C3.
- Press Enter. The average of cells C1 to C3, which is 100, appears.
Find the Lowest Number
You can use the MIN function to find the lowest number in a series of numbers.- Move to cell A7.
- Type Min.
- Press the right arrow key to move to cell B7.
- Type = MIN(B1:B3).
- Press Enter. The lowest number in the series, which is 12, appears.
Find the Highest Number
You can use the MAX function to find the highest number in a series of numbers.
.
- Move to cell A8.
- Type Max.
- Press the right arrow key to move to cell B8.
- Type = MAX(B1:B3).
- Press Enter. The highest number in the series, which is 27, appears.
Count the Numbers in a Series of Numbers
You can use the count function to count the number of numbers in a series.- Move to cell A9.
- Type Count.
- Press the right arrow key to move to cell B9.
- Choose the Home tab.
- Click the down arrow next to the AutoSum button .
- Click Count Numbers. Excel places the count function in cell C9 and takes a guess at which cells you want to count. The guess is incorrect, so you must select the proper cells.
- Select B1 to B3.
- Press Enter. The number of items in the series, which is 3, appears.
Fill Cells Automatically
You can use Microsoft Excel to fill cells automatically with a series. For example, you can have Excel automatically fill your worksheet with days of the week, months of the year, years, or other types of series.EXERCISE 2
Fill Cells Automatically
The following demonstrates filling the days of the week:- Click the Sheet2 tab. Excel moves to Sheet2.
- Move to cell A1.
- Type Sun.
- Move to cell B1.
- Type Sunday.
- Select cells A1 to B1.
- Choose the Home tab.
- Click the Bold button . Excel bolds cells A1 to B1.
- Find the small black square in the lower-right corner of the selected area. The small black square is called the fill handle.
- Grab the fill handle and drag with your mouse to fill cells A1 to B14. Note how the days of the week fill the cells in a series. Also, note that the Auto Fill Options button appears.
Copy Cells
- Click the Auto Fill Options button. The Auto Fill Options menu appears.
- Choose the Copy Cells radio button. The entry in cells A1 and B1 are copied to all the highlighted cells.
- Click the Auto Fill Options button again.
- Choose the Fill Series radio button. The cells fill as a series from Sunday to Saturday again.
- Click the Auto Fill Options button again.
- Choose the Fill Without Formatting radio button. The cells fill as a series from Sunday to Saturday, but the entries are not bolded.
- Click the Auto Fill Options button again.
- Choose the Fill Weekdays radio button. The cells fill as a series from Monday to Friday.
Adjust Column Width
Some of the entries in column B are too long to fit in the column. You can quickly adjust the column width to fit the longest entry.- Move your mouse pointer over the line that separates column B and C. The Width Indicator appears.
- Double-click. The Column adjusts to fit the longest entry.
Fill Times
The following demonstrates filling time:- Type 1:00 into cell C1.
- Grab the fill handle and drag with your mouse to highlight cells C1 to C14. Note that each cell fills, using military time.
- Press Esc and then click anywhere on the worksheet to remove the highlighting.
- Select cells C1 to C14.
- Choose the Home tab.
- Click the down arrow next to the number format box . A menu appears.
- Click Time. Excel changes the format of the time.
Fill Numbers
You can also fill numbers.Type a 1 in cell D1.
- Grab the fill handle and drag with your mouse to highlight cells D1 to D14. The number 1 fills each cell.
- Click the Auto Fill Options button.
- Choose the Fill Series radio button. The cells fill as a series, starting with 1, 2, 3.
- Go to cell E1.
- Type Lesson 1.
- Grab the fill handle and drag with your mouse to highlight cells E1 to E14. The cells fill in as a series: Lesson 1, Lesson 2, Lesson 3, and so on.
Create Headers and Footers
You can use the Header & Footer button on the Insert tab to create headers and footers. A header is text that appears at the top of every page of your printed worksheet. A footer is text that appears at the bottom of every page of your printed worksheet. When you click the Header & Footer button, the Design context tab appears and Excel changes to Page Layout view. A context tab is a tab that only appears when you need it. Page Layout view structures your worksheet so that you can easily change the format of your document. You usually work in Normal view.You can type in your header or footer or you can use predefined headers and footers. To find predefined headers and footers, click the Header or Footer button or use the Header & Footer Elements group's buttons. When you choose a header or footer by clicking the Header or Footer button, Excel centers your choice. The table shown here describes each of the Header & Footer Elements group button options.
Header & Footer Elements
| |
Button | Purpose |
Page Number | Inserts the page number. |
Number of Pages | Inserts the number of pages in the document. |
Current Time | Inserts the current time. |
File Path | Inserts the path to the document. |
File Name | Inserts the file name. |
Sheet Name | Inserts the name of the worksheet. |
Picture | Enables you to insert a picture. |
EXERCISE 3
Insert Headers and Footers
- Choose the Insert tab.
- Click the Header & Footer button in the Text group. Your worksheet changes to Page Layout view and the Design context tab appears. Note that your cursor is located in the center section of the header area.
- Click the right side of the header area.
- Click Page Number in the Header & Footer Elements group. When you print your document, Excel will place the page number in the upper-right corner.
- Click the left side of the Header area.
- Type your name. When you print your document, Excel will place your name in the upper-left corner.
- Click the Go To Footer button. Excel moves to the footer area.
- Click the Footer button. A menu appears.
- Click the path to your document. Excel will place the path to your document at the bottom of every printed page.
Return to Normal View
To return to Normal view:- Choose the View tab.
- Click the Normal button in the Workbook Views group.
Set Print Options
There are many print options. You set print options on the Page Layout tab. Among other things, you can set your margins, set your page orientation, and select your paper size.Margins define the amount of white space that appears on the top, bottom, left, and right edges of your document. The Margin option on the Page Layout tab provides several standard margin sizes from which you can choose.
There are two page orientations: portrait and landscape. Paper, such as paper sized 8 1/2 by 11, is longer on one edge than it is on the other. If you print in Portrait, the shortest edge of the paper becomes the top of the page. Portrait is the default option. If you print in Landscape, the longest edge of the paper becomes the top of the page.
Portrait
|
Landscape
|
EXERCISE 4
Set the Page Layout
- Choose the Page Layout tab.
- Click Margins in the Page Setup group. A menu appears.
- Click Wide. Word sets your margins to the Wide settings.
Set the Page Orientation
- Choose the Page Layout tab.
- Click Orientation in the Page Setup group. A menu appears.
- Click Landscape. Excel sets your page orientation to landscape.
Set the Paper Size
- Choose the Page Layout tab.
- Click Size in the Page Setup group. A menu appears.
- Click the paper size you are using. Excel sets your page size.
You can also use the Print Preview option to print. When using Print Preview, you can see onscreen how your printed document will look when you print it. If you click the Page Setup button while in Print Preview mode, you can set page settings such as centering your data on the page.
If your document is several pages long, you can use the Next Page and Previous Page buttons to move forward and backward through your document. If you check the Show Margins check box, you will see margin lines on your document. You can click and drag the margin markers to increase or decrease the size of your margins. To return to Excel, click the Close Print Preview button.
You click the Print button when you are ready to print. The Print dialog box appears. You can choose to print the entire worksheet or specific pages. If you want to print specific pages, enter the page numbers in the From and To fields. You can enter the number of copies you want to print in the Number of Copies field.
EXERCISE 5
Open Print Preview
- Click the Office button. A menu appears.
- Highlight Print. The Preview and Print The Document pane appears.
- Click Print Preview. The Print Preview window appears, with your document in the center.
Center Your Document
- Click the Page Setup button in the Print group. The Page Setup dialog box appears.
- Choose the Margins tab.
- Click the Horizontally check box. Excel centers your data horizontally.
- Click the Vertically check box. Excel centers your data vertically.
- Click OK. The Page Setup dialog box closes.
- Click the Print button. The Print dialog box appears.
- Click the down arrow next to the name field and select the printer to which you want to print.
- Click OK. Excel sends your worksheet to the printer.