Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
FUNCTIONS AND FORMULAS.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
5 Mб
Скачать

Functions and formulas

5.1 Understanding Functions and Formulas

Using formulas is the essential part of Excel. Microsoft Excel is best when you have lots of numbers and different calculations with these numbers. Each box (cell) is like a different address and can be used with its referring address or name.

Figure 5.1: A1 Reference Style

The a1 reference style

There are two different reference styles: A1 and R1C1. By default, Excel uses A1 reference style. This refers to columns with letters (A, B, C... XFC, XFD a total of 16384 columns) and rows with numbers (1 through 1.048.576).

These letters and numbers are called row and column headings. To refer to a cell, enter the column letter followed by the row number.

For example, D2 refers to the cell at the intersection of column D and row 2.

5 .2 Linking Worksheets

You can think that “Instead of gathering all the data in a single workbook, why do I need to link worksheets, or workbooks?” There can be many reasons:

  • To keep well organized workbooks

  • To have less workbook sizes

  • To have different security and access levels, etc.

In the ancient times, when there were no computers, we used papers to collaborate with people. Because, we have better network environments now, we don’t have to print hundreds of pages for a project and distribute it to others and wait for all to work and return the pages. Now, we can let all people work on their copies and we have links to appropriate locations, in order to have dynamic and up-to-date information.

The general syntax for a link

=[WorkbookName]SheetName!CellAddress

But, if linking from the same workbook and/or worksheet, you can skip the default parts and write only the cell address after the equal sign. So, if you want to have a link to A1 cell from the same worksheet, in the destination cell, you simply write: =A1

If you want to have a link to the A1 cell in Sheet1 from sheet2, you first write the sheet name followed by an exclamation mark and write the cell address in the destination cell: =Sheet1!A1

If you want to have a link to the A1 cell in Sheet1 in the ‘Plans.xlsx’ workbook from another workbook, you

  • f irst write the workbook name in square brackets,

  • then, sheet name followed by an exclamation mark and

  • write the cell address in the end: =[Plans.xlsx]Sheet1!A1

5.2.1 Creating a link formula by pointing

Because, when entering external reference formulas manually, you can easily make errors, usually it’s not the suggested method. Instead, have Excel build the formula for you:

  1. Open the source workbook.

  2. Select the cell in the dependent workbook that will hold the formula.

  3. If you’re simply creating a link and not using the external reference as part of a formula, just enter an equal sign (=) and then select the cell and press Enter. If you are entering a formula, when you get to the part that requires the external reference, activate the source workbook and select the cell or range and press Enter.

  4. After you press Enter, you return to the dependent workbook, where you can finish the formula.

Because the references that you create with this method are always absolute references, if you plan to copy it to create additional link formulas, you need to pay attention when using them as absolute or relative references.

As long as the source workbook remains open, the external reference doesn’t include the path to the workbook. If you close the source workbook, however, the external reference formulas change to include the full path.

5.3 Writing Your First Formula

To write a formula, you must start with an equal sign “=”. Then, using references, numeric values and arithmetic operators, you can write your own formulas. (You can see the cell reference name in Name Box on the left of Formula Bar).

Example 5.1:

You have a worksheet that lists exams for students. Write a formula for your teacher that calculates each student’s average

S olution: In order to calculate a student's average, you need to calculate the sum of Exam1, Exam2 and Exam3 and then divide the result by 3.

For the first student, according to Figure 5.2, the cell containing

  • Exam1 mark is D4;

  • Exam2 is E4; and Exam3 is F4.

And you should use these referring addresses in your formulas.

Now, you know all the details and you are ready to write your formula. First, you select the cell where the result will appear (G4) and then write the formula below in the formula bar:

= (D4+E4+F4)/3

After you press the ENTER key, it will display the average of the first student. Now, you can copy this formula to other students. When you copy and paste formulas, Excel will automatically make the necessary changes in formulas for every row and column references. For the second student the Exams are stored in the 5th row and the formula will be = (D5+E5+F5)/3

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]