Você está na página 1de 18

Functions

Using formulas and functions we can perform calculations based on our cells or we can convert the data in the spreadsheets to a particular format or value so it can be used by another formula or function. The built-in functions in Excel can be used to perform more complex calculations based on our data.

To insert a function we need to select the cell which will hold the function, go to the Formulas ribbon and click on the Insert Function button.

Functions are grouped into categories based on the operations they can be used for.

Some of the most important functions in Excel are: Math & Trig o SUM o SUMIF o ROUND Statistical o MIN o MAX o AVERAGE o COUNT o COUNTA o COUNTIF o COUNTBLANK Text o CONCATENATE o TRIM o EXACT Logical o IF Lookup & Reference o VLOOKUP

=SUM(number1; [number2]; [number3]; [number4]; ...)


The SUM function adds all the numbers that we specify as arguments. For example, =SUM(A1:A5) adds all the numbers that are contained in cells A1 through A5. For another example, =SUM(A1; A3; A5; B9:B65) adds the numbers that are contained in cells A1, A3, A5 and all the numbers that are contained in cells B9 through B65.

Formulas > Insert Function

=SUMIF(range; criteria; [sum range])


We use the SUMIF function to sum the values in a group of cells that meet criteria that we specify. For example, suppose that in a column that contains numbers, we want to sum only the values that are larger than 5. We can use the following formula: =SUMIF(A2:A25;">5")

Formulas > Insert Function

In this example, the criteria is applied the same values that are being summed.

=ROUND(number; num digits)


The ROUND function rounds a number to a specified number of digits. For example, if cell A1 contains 23.7825, and you want to round that value to two decimal places, you can use the following formula: =ROUND(A1; 2) The result of this function is 23.78.

Formulas > Insert Function

=MIN(number1; [number2];...)
The MIN function returns the smallest number in a set of values. For example, if the range A1:A20 contains numbers, the formula =MIN(A1:A20) returns the smallest number in the set of values.

Formulas > Insert Function

=MAX(number1; [number2];...)
The MAX function returns the largest number in a set of values. For example, if the range A1:A20 contains numbers, the formula =MAX(A1:A20) returns the largest number of the set of values.

Formulas > Insert Function

=AVERAGE(number1; [number2];)
The AVERAGE function returns the average (arithmetic mean) of the arguments. For example, if the range A1:A20 contains numbers, =AVERAGE(A1:A20) returns the average of those numbers. the formula

Formulas > Insert Function

=COUNT(value1; [values2];)
The COUNT function counts the number of cells that contain numbers in a range. We use the COUNT function to get the number of entries in a number field that is in a range or array of numbers. For example, we can enter the following formula to count the numbers in the range A1:A20: =COUNT(A1:A20) In this example, if five of the cells in the range contain numbers, the result is 5.

Formulas > Insert Function

=COUNTA(number1; [number];)
The COUNTA function counts the number of cells that are not empty in a range. We use the COUNTA function to get the number of completed cells in a range or array of numbers. For example, we can enter the following formula to count the number of completed cells in the range A1:A20: =COUNTA(A1:A20) In this example, if five of the cells in the range contain values (numbers, text, dates), the result is 5.

Formulas > Insert Function

=COUNTIF(range; criteria; [sum range])


The COUNTIF function counts the number of cells within a range that meet a single criterion that we specify. For example, we can count all the cells that start with a certain letter, or we can count all the cells that contain a number that is larger or smaller than a number we specify. For example, suppose we have a worksheet that contains a list of tasks in column A, and the first name of the person assigned to each task in column B. We can use the COUNTIF function to count how many times a person's name appears in column B and, in that way, determine how many tasks are assigned to that person. For example: =COUNTIF(B2:B25;"Nancy")

Formulas > Insert Function

=COUNTBLANK(range)
The COUNTBLANK function counts the empty cells in a specified range of cells. For example, we can enter the following formula to count the number of blank cells in the range A1:A20: =COUNTBLANK(A1:A20) In this example, if five of the cells in the range are blank, the result is 5.

Formulas > Insert Function

=CONCATENATE(text1; [text2];)
The CONCATENATE function joins up to 255 text strings into one text string. The joined items can be text, numbers, or a combination of those items. For example, if our worksheet contains a person's first name in cell A1 and the person's last name in cell B1, we can combine the two values in another cell by using the following formula: =CONCATENATE(A1;" ";B1) The second argument in this example (" ") is a space character. We must specify any spaces or punctuation that we want to appear in the results as an argument that is enclosed in quotation marks.

Formulas > Insert Function

=TRIM(text)
The TRIM function removes all spaces from text except for single spaces between words. We usually use TRIM on text that we have received from another applications that may have irregular spacing. For example, we can enter the following formula to remove the leading and trailing spaces from the text in cell A1: =TRIM(A1)

Formulas > Insert Function

=EXACT(text1; text2)
The EXACT function compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. EXACT is case-sensitive. For example, we can enter the following formula to see if the text in cell A1 is the same like the one in cell B1: =EXACT(A1;B1)

Formulas > Insert Function

=IF(logical_test; value_if_true; [value_if_false])

The IF function returns one value if a condition we specify evaluates to TRUE, and another value if that condition evaluates to FALSE. For example, the formula =IF(A1>10;"Over 10";"10 or less") returns "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less than or equal to 10.

Formulas > Insert Function

=VLOOKUP(lookup_value; table_array; col_index_num; [range_lookup])


We can use the VLOOKUP function to search the first column of a range of cells, and then return a value from any cell on the same row of the range. For example, suppose that we have a list of employees contained in the range A2:C10. The employees' ID numbers are stored in the first column of the range, as shown in the following illustration.

If we know the employee's ID number, we can use the VLOOKUP function to return either the department or the name of that employee. To obtain the name of employee number 38, we can use the formula =VLOOKUP(38; A2:C10; 3; FALSE). This formula searches for the value 38 in the first column of the range A2:C10, and then returns the value that is contained in the third column of the range and on the same row as the lookup value ("Axel Delgado"). Important: Always set the last parameter to FALSE or 0 to ensure that we obtain 100% accurate values.

Formulas > Insert Function

Você também pode gostar