Excel 2000-2001 Advanced Naming ranges A rectangular group of cells on a worksheet is called a range. One way to make a reference to a range (such as in a function) is to show the first cell address, a colon, and the last cell address. Another way to refe rence a range is to define it with a name. The name may be used in the argument (number) portion of formulas (instead of cell addresses). Name box
There are two ways to name a range: by using the Name box on the Formula bar or by using the menu Insert, Name. Select the cells to be named first; then either click in the Name box or click Insert, Name, Define; type in the range name and press e. The range name can be as long as you want, but there cannot be any spaces, commas, or periods. You should use names that are easy to remember and type. The Insert, Name, Create command may be used if the selected cells include the range name either above, below, or to the left or right of the cells. The Name box has a drop down arrow that you can use to select a range, the cursor will move to the range and the range will be highlighted. [You can use the Name box to go to a specific cell or range, just select the Name box, type the cell address or range name and press e.] The range can be used in a formula such as: = sum(march) = average(grades). To use a name in a formula, start the formula, when you need to put in an argument, either type the name in place of the cell range or click the drop down list of names and select a name from the list. Finish the formula as you normally would and press e. Sheet tab scrolling buttons
Working with sheets
Sheet tabs
Files in Excel are called workbooks because they may contain multiple worksheets and/or chart sheets. Each worksheet may contain 256 columns and 65,536 rows. Initially the workbooks have three worksheets; you may change that by clicking on Tools, Options, General and changing the number of Sheets in New Workbook. The sheet tabs are displayed in the lower left corner of the screen. The Sheet tab scrolling buttons are to the left of the sheet tabs; use the buttons to scroll the display of the sheet tabs, only six are displayed at once. To make a sheet active, click its tab at the bottom of the screen and the sheet will be displayed. You may select several sheets at once by either holding down the s key (if they are adjacent sheets) or if they are not adjacent sheets hold the c key (z key on the Mac). If you have more than one sheet selected when you enter data, the data will appear on all selected sheets. To rename a sheet, double-click on its tab; the name is highlighted, type in the new name and either press e or click in a cell or on another sheet. To insert a new sheet, click Insert, Worksheet and a new worksheet is added. To delete a sheet, click its sheet tab to select it, then click Edit, Delete Sheet respond OK to the question: “Selected sheets will be permanently deleted, continue?”. Another way to rename, insert or delete a sheet is to select the sheet tab, press the right mouse button (or c + click the mouse on the Mac) while pointing to the
ITS - C Standfield
Page 1 of 10
Excel 2000/01 Advanced 5/31/02
selected sheet tab, and selecting the desired command from the shortcut menu. To rearrange the worksheets drag the worksheet tab to a new location (in the list of sheets) a € appears above the sheet tabs where the tab will be moved, release the mouse button to drop the sheet tab in a new position. When creating formulas the cell addresses may be all on one sheet or they may be spread out over several sheets. A sample formula is: Sheet1!C10+Sheet2!C10+Sheet3!C10 if the sheets had been renamed the formula might be: Western!C10+Central!C10+Eastern!C10. The formula may be typed in, with the sheet name followed by an exclamation mark, or you may use the mouse to select each address in the formula. When you save the workbook all the worksheets are saved in the same file. You may also have a formula that includes cell addresses from more than one file; in the formula the file name will be enclosed in brackets. An example of a formula using addresses from multiple files: =D14+Eastern!D14+[BUDGET02.XLS]Central!$D$14. If you are working with more than one file, you may want to save them as a workbook. Have open all the files that you are working with, click File, Save Workspace. When you open the workspace file it will open the files that were being used when the workspace was saved. Workspace files are small and have .XLW for the extension.
AutoCalculate AutoCalculate is on the status bar on the right hand side. If you select several numbers and look at AutoCalculate you will see a display like: SUM=113334. In other words it is giving you the SUM before you ask; the answer is only on the status bar though, not in a cell. It will continue to display the sum for selected numbers unless you change the function. To change the function, point to the AutoCalculate area and press the right mouse button (or c + click the mouse button on the Mac), the choices displayed are: Average, Count, Count Nums, Max, Min, and Sum. It will be set for the selected function until you change it again.
Using the Paste Function Wizard Excel has hundreds of worksheet formulas (functions) that help you create a special calculation. The Paste Function wizard walks you through creating a formula using one or more of these special functions. Examples of formulas using a function are: = SUM(C23:C33) =AVERAGE(B20:H20) =ROUND(AVERAGE(F10:F55),0) You may type in a formula or use Paste Function. There are at least two parts to most functions: the function itself (i.e. SUM, AVERAGE, COUNT) and the number or numbers AVERAGE(number1, number2,…). The function determines what the formula does and the number (or argument) indicates which cells will be
ITS - C Standfield
Page 2 of 10
Excel 2000/01 Advanced 5/31/02
used. Some functions require more than one argument, which are separated by commas; such as IF(logical_test, value_if_true, value_if_false). To use Paste Function, click the cell where you want the answer displayed. Select a category from the Function Category list. Select the desired function from the Function Name list, click Next. Most functions will require an number, so the next dialog box will request information. A number may be either a range of cells, the number of decimal places, or an interest rate, etc. Fill in the information as requested and click OK. The answer will be displayed in the cell; the formula will be displayed in the Formula Bar.
Useful Functions Functions that are used frequently are Sum, Average, Round, Max, Min, If, Pmt, Count, CountA, and Today. The AutoSum button is the easiest way to enter the Sum function, Sum will add up a list of numbers whether they are in a single column or row or in multiple columns and rows [ex: =Sum(B5:B22)]. All of the functions can be entered with Paste Function. The Average function will add a list of values then divide by the total number of values [ex: =AVERAGE(B5:B22)]. Round will round a number or an answer to the specified decimal places [ex: =ROUND(B23,2) or =ROUND(AVERAGE(B5:B22), 2)]. Max will determine the greatest number in a range [ex: =MAX(B5:B22)]; Min will determine the smallest number in a range [ex: =MIN(B5:B22)]. The If function is used to test a condition, if the result is "true" it will respond with one value, if the result is "false" it will respond with a different value [ex: =IF(B5>100, B5*.025, B5*.03) in this example if the value in B5 is greater than 100 it will multiply the value by .025 if the value in B5 is not greater than 100 it will multiply by .03]. The Pmt function can be used to calculate the payment amount on a loan. You will need to know the principal, the term, and the interest rate. The term and the interest rate must be in the same measure, if the term is the number of months then use the monthly interest rate. [For example if the principal = $24,000 the annual interest rate is 9.25% and the note is for 4 years, divide the interest rate by 12 months and multiply the years by 12 months to calculate the monthly payment. =PMT(9.25%/12,4*12,24000)]. The Count and CountA functions perform similarly. The Count function counts only the numbers in a range [ex: =COUNT(B5:B22)]. The CountA function counts all the non-empty cells in a range [ex: =COUNTA(B5:B22)]. Use the Today function to enter today's date [ex: =TODAY()] or use the Now function to enter the date and the time [ex: =NOW()]. You may subtract two dates to find the number of days between them. You may also add to a date to discover a date the specified number of days away. You may subtract to find the amount of time between two given times, the given times must be in time format. Use the Date & Time formats to change the appearance of the date and/or the
ITS - C Standfield
Page 3 of 10
Excel 2000/01 Advanced 5/31/02
time. When you enter a date in a cell, Excel sees it as a serial number that equals the number of days from 1/1/1900 until the given date; Excel assumes a date format so that it appears as a date.
Creating formulas with relative and absolute addresses Anytime you copy a formula from one cell to another the addresses in the cell are automatically adjusted for the new cell address because they are relative addresses. There are times when you will need a formula with one or more absolute addresses that do not change automatically when the formula is copied, such as a cell containing a fixed percentage. An absolute cell address is one with $ signs in front of the column and/or the row such as $C$25. You put a $ in front of the column if the column needs to remain the same and/or you put a $ in front of the row if the row needs to remain the same. There are four possibilities, a relative address: C25 and three absolute addresses: $C25, C$25, $C$25. You may either type the $ or you may use the $ key (z + T on the Mac) to put the $ in for you. When typing the formula, click the cell that needs an absolute address then press the $ key (z + T on the Mac) until you have the correct address. If the formula is already typed, select the address in the formula bar and then press the $ key (z + T on the Mac).
Data Sort The Sort Ascending and Sort Descending buttons on the Standard toolbar only sort by one column. We the Data, Sort command you can sort by up to three columns or fields. Click in the data, click Data, Sort to display the Sort dialog box. If your database has column headings (field names) be sure that Header row is selected, if there are no column headings be sure that No Header row is selected. If you do not have a header row, then the drop down lists will display “Column A, Column B, Column C…”. Select a column (field) from the drop down list under Sort by, then click Ascending or Descending on the right side. To sort by additional columns or fields, make a second selection under Then by and if desired a third selection under the last Then by. Click OK to sort the database. In the example, the list would first be sorted by Customer. The records with the same Customer, would then be sorted by Part #. The records with the same Customer and Part # would then be sorted by Order Date.
AutoFilter Use the AutoFilter command to filter out data that you don't want to see. Click in the database, select Data, Filter, AutoFilter; drop down arrows appear for each column (field). When you click one of the arrows, a list of possible criteria appears. If you click one of the items, then all entries in the field that don't match will be hidden. For example if you click one of the customer's names in the list, then all the entries for other customers will be hidden. The fields that have active filters have a blue arrow rather than a black one. To redisplay all the ITS - C Standfield
Page 4 of 10
Excel 2000/01 Advanced 5/31/02
information, click the arrow again and select (All). If you select (Custom) filter, then you can set up your own criteria. For example in a numeric field such as Quantity you can search for < (less than) or > (greater than) a given number. You can combine the criteria using And or Or then add another criteria to use. If a filter in one field is already active when you set a filter for another field then they are both in effect.
Subtotals The Subtotals command will take a sorted data list and apply a function such as Sum to a selected field and display the results. In order to display the subtotals, first select the list and sort it; click Data, Sort. In the Sort dialog box select the field to be sorted, choose whether you want Ascending or Descending and click OK. [You may select to sort by up to two additional fields.] After sorting, click Data, Subtotals which displays the Subtotal dialog box. In the At Each Change in: edit box select the field that you sorted by. Click the Use Function drop down list arrow to select the desired function. The functions listed are: Sum, Count, Average, Max, Min, Product, Count Nums, StdDev, StdDevp, Var, and Varp. The Add Subtotal To edit box is where you select what you are subtotaling; after selecting the field to be subtotaled, click OK. The subtotals appear on the spreadsheet in the selected column. A grand total appears at the very bottom. In the gray area to the left of the spreadsheet are buttons 1, 2, 3 to control the level of detail that is displayed. You may click [1] for the grand total only; [2] for just the subtotals; and [3] to see all the detail. The levels visible on the screen are the ones that will print. In order to add more subtotals to the same list, set up one field to subtotal, then click Data, Subtotals and set up an additional field; be sure to turn OFF Replace Current Subtotals so that it will add additional fields instead of replacing. If you want to remove the subtotals (to edit the data for example), click Data, Subtotals, Remove All. The spreadsheet will look like it did before the subtotals.
ITS - C Standfield
Page 5 of 10
Excel 2000/01 Advanced 5/31/02
Goal Seek The Goal Seek command will look at your formula, ask for the value you want, and keep trying numbers in the formula until it arrives at the desired value. For example, if you want to see how large a loan you can afford at a given rate over a specific time period, use Goal Seek to find the principal when you specify what payment you want. It can also be used to find a break-even point. You should already have the formula typed in the cell. Click Tools, Goal Seek a dialog box is displayed. In Set cell: type the address of the cell that you want to keep at a certain value. In To value: type the value that you want to keep it to. In By changing cell: put the address of the cell that you want to change. Click OK and the answer will be calculated.
Data Tables A Data Table is used to see the effect of one or two variables on the results of a formula. The variables need to be typed in and so does the formula. For example, if you are using the Pmt formula you could see "what if" the interest rate was a different amount. If you have the Pmt formula typed in, as well as the rate values that you wish to try. Select the range for the table then click Data, Table; if the rates are in a row use Row Input Cell, if the rates are typed in a column then use Column Input Cell. There is a sample data table in the figure on the left. It is set up with two variables (two input cells) one in a row and one in a column, with the formula in the upper left hand corner. In the example on the right, the formula is typed in cell F51, the variable interest rates are typed in a row and the variable number of years is typed in a column. To create this table, select the cells F51:K56, click Data, Table. For the Row Input cell type C52 and for the Column Input cell type C53.
Data Validation The Data, Validation command allows you to control values entered into cells. For example, you can specify that only Whole Numbers can be entered and state the Minimum and Maximum values allowed. You can also create a list for a drop down list, so that only the items in the list can be selected. The choices under Validation criteria Allow are: Any value, Whole number, Decimal, List, Date, Time, Text length, and Custom.
ITS - C Standfield
Page 6 of 10
Excel 2000/01 Advanced 5/31/02
To create a validation for a certain type of value, select the cell or cells, click Data, Validation. Under Data select from between, not between, equal to, not equal to, greater than, less than, greater than or equal to, and less than or equal to. Fill in the requested values in Minimum, Maximum or Value. To create a drop down list for a cell, first type the list of items. Select a cell, click Data, Validation. Under Allow select List then select the cells or type the range in Source click OK. A cell Validation may be easily copied using AutoFill.
Excel Advanced - Exercise 1. 2. 3. 4.
In Excel, Open the file sample2-2000 Click File, Save As and change the name to Company Workbook Double click on the Sheet1 tab, rename it Western Rename Sheet2 to Central, Sheet3 to Eastern, Sheet4 to Totals, Sheet5 to Orders, and rename Sheet6 to PMT. 5. Scroll through the sheet tabs until Sheet8, Sheet9, and Sheet10 tabs are visible; click in A1 of Sheet8. Hold down the s key, click Sheet10 to select all three sheet tabs. 6. Type your name in a cell on Sheet8, click on one of the other sheet tabs (such as Sheet11) to turn off the selection, then click on each of the three that had been selected: Sheet8, Sheet9, and Sheet10. Your name should be in the same cell of all three. 7. Hold the c key (z on the Mac) and select the sheets 8, 12, 15, and 16 then click Edit, Delete Sheet, OK. 8. Select Sheet9 and drag it to move it between Sheet13 and Sheet14; drag Sheet11 between Sheet7and Sheet10. 9. Hold the s key and select all the sheets from Sheet7 through the last sheet, Sheet14 then Edit, Delete Sheet OK (leaving six sheets). 10. Click on the Western sheet tab to select it. Click the Save button. 11. Select the range C23:C34, then click Insert, Name, Define type Jan and click OK. 12. Select the range I23:I34, then select I23 in the Name box type Jul click in an empty cell. 13. Select the range B14:F14, then click Insert, Name, Create; Left Column should already be selected, click OK. [Assigns the name Operating_Income to the selected range.] 14. Select the range B32:N32, then click Insert, Name, Create; Left Column should already be selected, click OK. [Assigns the name Travel_Expenses to the selected range.] 15. Click in cell H10, click the Function Wizard button, click MIN, click Next, select the cells C10:F14, click Finish. The answer appears in the cell, the formula is: =Min(C10:F14). 16. Click in cell H11, click the Function Wizard button, click MAX, click Next, select the cells C10:F14, click Finish. The answer appears in the cell, the formula is: =Max(C10:F14).
ITS - C Standfield
Page 7 of 10
Excel 2000/01 Advanced 5/31/02
17. Click in cell H14, click the Function Wizard button, click AVERAGE, click OK, click Insert, Name, Paste select Operating_Income, click OK. The answer appears in the cell, the formula is: =Average(Operating_Income). 18. Click in cell G14, click the Function Wizard button, click ROUND, click Next, select cell H14, click in the num_digits box and type 0, click Finish. The rounded answer from cell H14 appears in G14, the formula is =Round(H14,0). [Another way would be to change the formula in H14 to be: =Round(Average(Operating_Income),0) the answer appears in H14.] 19. Click in cell H7, click the Function Wizard button, select ROUND, click OK. Click the Function drop down arrow on the Formula bar, select SUM, click Insert, Name, Paste select Travel_Expenses then click OK. Instead of the Step 2 screen for the Round function you will probably get an error message. In the Formula bar, the cursor is flashing in the formula, type type ,2 press e. [The completed formula is =Round(Sum(Travel_Expenses),2). ] 20. Click the Save button. 21. Click Insert, Worksheet. Drag the new worksheet tab to the position after the Totals sheet tab. In A3 type January; in C3 type July. 22. Click the Western worksheet tab, click the drop down arrow in the Name box, select Jan, click Edit, Copy. 23. Click on the Sheet1 tab, click in A4, click Edit, Paste Special, Values click OK. 24. Click on the Western worksheet tab, click the drop down arrow in the Name box, select Jul, click Edit, Copy. 25. Click on the Sheet1 tab, click in C4, click Edit, Paste Special, Values click OK. 26. Click in B4, create the formula to find the percent for expense to total: =A4/A15 format it as % with 2 decimal places. Fill the formula down the column from B5 through B14. [Since it does not have an absolute address, it does not work in the other cells.] 27. Edit the formula in cell B4 so that it has an absolute address where needed, then copy the new formula down the column. [=A4/$A$15] To edit the formula, select A15 in the formula bar, then press $ (z + T) to insert the $$. Copy the formula to the rest of the column. 28. Enter the formula in D4 to calculate the expense to total percent, then copy it to the rest of the column. [=C4/$C$15] 29. Drag Sheet1 to the end, after the PMT sheet, click the Save button; select the Totals sheet. 30. Click in cell C14, begin a formula, press = then click the Western sheet tab, click cell C18 and press + then click the Central sheet tab, click C18, press + then click the Eastern sheet tab, click C18 , press e. The formula on the Totals sheet in cell C14 should be: =Western!C18+Central!C18+Eastern!C18. 31. Use AutoFill to copy the formula to C15 and then copy both formulas across to N14 and N15. Look over the formulas.
ITS - C Standfield
Page 8 of 10
Excel 2000/01 Advanced 5/31/02
32. Click in cell C19 on the Totals sheet , begin a formula, press = then click the Western sheet tab, click cell C23 and press + then click the Central sheet tab, click C23, press + then click the Eastern sheet tab, click C23 , press e. The formula on the Totals sheet in cell C19 should be: =Western!C23+Central!C23+Eastern!C23. 33. Use AutoFill to copy the formula to C20:C29 and then copy all the formulas across to N29. 34. Look over the formulas, then click the Save button. 35. Click the Orders sheet tab to select it; click cell I2. 36. Use the Function Wizard to put in an IF formula to calculate a discount for orders over $700; select IF, click OK. For logical_test type: F2>700 for value_if_true type: F2*0.9 for value_if_false type: F2 click OK. The completed formula is: =IF(F2>700, F2*0.9, F2) 37. Use AutoFill to copy the formula down the column. 38. Select column I, then look at the AutoCalculate number displayed to see the Sum. Point to the AutoCalculate number and press the right mouse button (or z + click the mouse on a Mac) select Average. 39. Change the AutoCalculate function to Min, Max and Count Nums. 40. Click in cell J2; use the Function Wizard to put in an IF formula to calculate a 5% charge for delivery under 5 days. Select IF, click OK. For logical_test type: H2<5 for value_if_true type: I2*0.05 for value_if_false type: 0 click OK. The completed formula is: =IF(H2<5, I2*0.05, 0) 41. Use AutoFill to copy the formula down to J70; also AutoFill the formula in K2 down to K70. 42. Go to cell B71 type the formula or use the Paste Function Wizard to create the formula: =COUNTIF(B2:B70,"EC08") Any part number could replace “EC08” to count the number of orders for that part number. 43. Click the Save button. Click in A2 or some other cell in the list. 44. Click Data, Filter, AutoFilter to turn on the filter arrows. 45. Click the Customer filter arrow, select Hilo Ventures; look at the results. To redisplay the records, click the Customer filter arrow, select All. 46. Click the Quantity filter arrow, select 5; look at the results. Click the Quantity filter arrow, select Custom, then select >= 5 OK look at the results. 47. Sort the filtered records by Customer and Order Date: click Data, Sort, Sort By Customer, Then By Order Date click OK. 48. Click the Total filter arrow, select Custom, then put >1000 OK. Select column F, use AutoCalculate to find out the sum of the selected records (Sum). 49. Click Data, Filter, AutoFilter to turn off the filter and redisplay all the records.
ITS - C Standfield
Page 9 of 10
Excel 2000/01 Advanced 5/31/02
50. Sort the records by Customer and Order Date again: click Data, Sort, Sort By Customer, Then By Order Date click OK. 51. Click Data, Subtotals; set it so that: At Each Change in: Customer Use Function: Sum Add Subtotal to: Total Charges and click OK. Subtotals should be displayed for each customer, with a grand total at the bottom. 52. Click the 1, 2, and 3 level buttons on the top left to see the available displays. 53. Click Data, Subtotals again; turn OFF Replace Current Subtotals; select Use Function: Average and Add Subtotal to: Days to Delivery (turn off Total Charges). Click OK. 54. Click the Print Preview button to see how it would print. 55. Remove the subtotals: click Data, Subtotals, Remove All. 56. Click the PMT sheet tab; look at the formula in cell C6. 57. Click the Name list box and select Goal_Seek 58. Click in cell C26; select Tools, Goal Seek. 59. Set up Goal Seek so that Set Cell: $C$26 To Value: 900 By Changing Cell: $C$21 (the principal); click OK. 60. Read the Goal Seek Status screen, then click Cancel. 61. Select Tools, Goal Seek again. Set up Goal Seek so that Set Cell: $C$26 To Value: 800 By Changing Cell: $C$22 (the interest rate); click OK. Read the Goal Seek Status screen, then click Cancel. 62. Click the Name list box and select Table_1 63. Select B36:C41 then click Data, Table for the Column Input Cell type C2 and click OK. 64. Select E36:J37 then click Data, Table for the Row Input Cell type C2 and click OK. 65. Click the Name list box and select Table_2 66. Select C51:H56 then click Data, Table for the Row Input Cell type C1 (the principal) and for the Column Input Cell type C2 (the interest rate) click OK. 67. Click the Save button. Close the file. 68. In cells N2:N8 type the part numbers in the table on the right: 69. Delete the contents of B71 70. In B71, click Data, Validation then select List under Allow: 71. In the Source, select N2:N8, click OK. 72. Use AutoFill to copy down 5 cells from B71. Try out the drop down list in one of these cells. 73. Click the Save button. Close the file. 74. Exit from Excel.
ITS - C Standfield
Page 10 of 10
DC25 DC27 DC28 EC08 HC40 HC46 JC14
Excel 2000/01 Advanced 5/31/02