Week 1 and 2 - The Difference Between A Formula and A Function
Week 1 and 2 - The Difference Between A Formula and A Function
All formulas must start with the equals sign. =1+2+3 or =B2+B6+B8
A function is a piece of code designed to calculate specific values and are used inside formulas.
A function is a built-in operation, such as SUM(), AVERAGE(), etc. A formula (also known as
an equation) is something that the user defines, and can use/refer to various functions in it. A
formula starts with an = sign, such as =(D1+D2)/A$3. They are similar in that both return a
result based on the calculations that each performs. The difference is that a function is a built-in
calculation, while a formula is a user-defined calculation. A formula could just use a single
function.
For example, if you enter =AVERAGE(A1:A56), that is a formula, using the AVERAGE
function. If you enter =SUM(G4+A5) - 25 * MIN(B3:B6), that is a formula which uses both the
SUM function and the MIN function, as well as standard mathematical operators (-, +, *).
Count and Sum Functions
he most used functions in Excel are the functions that count and sum. You can count and sum
based on one criteria or multiple criteria.
Count
To count the number of cells that contain numbers, use the COUNT function.
Note: to count blank and nonblank cells in Excel, use COUNTBLANK and COUNTA.
Countif
To count cells based on one criteria (for example, greater than 9), use the following COUNTIF
function.
Countifs
To count rows based on multiple criteria (for example, green and greater than 9), use the
following COUNTIFS function.
Sum
Sumif
To sum cells based on one criteria (for example, greater than 9), use the following SUMIF
function (two arguments).
To sum cells based on one criteria (for example, green), use the following SUMIF function (three
arguments, last argument is the range to sum).
Sumifs
To sum cells based on multiple criteria (for example, circle and red), use the following SUMIFS
function (first argument is the range to sum).