Professional Documents
Culture Documents
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
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.
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.