You are on page 1of 2

Formulas and Functions in MS EXCEL

COUNT
Formulas Use the COUNT function to get the number of entries in a
In Excel, a formula is an expression that operates on number field that is in a range or array of numbers. For example,
values in a range of cells or a cell. you can enter the following formula to count the numbers in the
range A1:A20: =COUNT(A1:A20). In this example, if five of the
How do you use Excel with formulas? cells in the range contain numbers, the result is 5.
1. Create a formula that refers to values in other cells
2. Select a cell.
3. Type the equal sign =. Note: Formulas in Excel always
begin with the equal sign.
4. Select a cell or type its address in the selected cell.
5. Enter an operator
Addition (+), Subtraction (-),
Multiplication (*), Division ( / or ÷)
6. Select the next cell, or type its address in the selected
cell.
7. Press Enter.

Example: COUNTA
Like the COUNT function, COUNTA counts all cells in a
given rage. However, it counts all cells regardless of type. That is,
unlike COUNT that only counts numerics, it also counts dates,
times, strings, logical values, errors, empty string, or text.

Functions
Functions are predefined formulas in Excel. They eliminate
laborious manual entry of formulas while giving them human-
friendly names.
For example: =SUM(A1:A3). The function sums all the values
from A1 to A3.
The parts of a function IF
In order to work correctly, a function must be written a The IF function is often used when you want to sort your
specific way, which is called the syntax. The basic syntax for a data according to a given logic. The best part of the IF formula is
function is an equals sign (=), the function name (SUM, for example), that you can embed formulas and function in it.
and one or more arguments. Arguments contain the information you Example:
want to calculate. The function in the example below would add the =IF(C2<D3, ‘TRUE,’ ‘FALSE’) – Checks if the value at C3
values of the cell range A1:A20. is less than the value at D3. If the logic is true, let the cell value
be TRUE, else, FALSE

=IF(SUM(C1:C10) > SUM(D1:D10), SUM(C1:C10),


SUM(D1:D10)) – An example of a complex IF logic. First, it sums
C1 to C10 and D1 to D10, then it compares the sum. If the sum
AUTOSUM of C1 to C10 is greater than the sum of D1 to D10, then it makes
When you click AutoSum, Excel automatically enters a formula the value of a cell equal to the sum of C1 to C10. Otherwise, it
(that uses the SUM function) to sum the numbers. makes it the SUM of C1 to C10.
Here’s an example. To add the January numbers in this
Entertainment budget, select cell B7, the cell immediately below the Another example:
column of numbers. Then click AutoSum. A formula appears in cell
B7, and Excel highlights the cells you’re totaling.

AVERAGE
Returns the average (arithmetic mean) of the arguments. For
example, if the range A1:A20 contains numbers, the formula
=AVERAGE(A1:A20) returns the average of those numbers.

MAX AND MIN


The MAX function allows you to find the highest number in
given range. The MIN function does the opposite, providing you
with the lowest number in a defined range.
Example:
=MIN(B2:C11) – Finds the minimum number between
column B from B2 and column C from C2 to row 11 in both
columns B and C.
=MAX(B2:C11) – Similarly, it finds the maximum number 6 Most Common Excel Errors
between column B from B2 and column C from C2 to row 11 in 1. ###### error
both columns B and C. Problem: The column is not wide enough to display all the
Another example: characters in a cell.
Fix: Extend the width of the column.

2. # Div/0! error
Problem: Excel displays this error when a number is divided
either by zero (0) or an empty cell.
The output will be Fix: Change the divider to a value that is not equal to 0.

3. #Name? error
Problem: The text in a formula is not recognised by Excel. This
is caused by misspelling the function names. For instance
=su(A1:A7) will result in the #Name? error.
Fix: Correct the error by entering =sum(A1:A7).

4. #Value! error
Problem: This error will be displayed if the formula includes cells
that contain different data types. = B1(85) + B2(75) +B3(data)
will result in the #Value! error message.
Fix: Replace B3(data) with a numeric value and the error will be
corrected.

5. #REF! error
Problem: The error will be displayed when a cell reference is not
valid. Deleting cells that were referred by other formulas will
cause this error.
The output will be Fix: Refer the cells to the correct ranges and the error will be
corrected.

6. #NUM! error
Problem: The formula or function contains invalid numeric
values.
Fix: Using $ ,% symbols with the number can result in this error,
so avoid using these.

7. #NULL error
Problem: Excel displays this error when you specify an
intersection of two areas that do not intersect (cross). The
HLOOKUP AND VLOOKUP intersection operator is a space character that separates
In simple terms, HLOOKUP function searches horizontally references in a formula. =Sum(A1:A2 C3:C5) returns the #NULL
through rows to retrieve data from a specific row in the table. The error because the two ranges do not intersect.
VLOOKUP, or vertical lookup function, on the other hand, is Fix: =SUM(A1:F1 B1:B10) will return the correct reference.
rather used when data is listed in columns instead of rows.

You might also like