Week 3
Week 3
Functions
• Cell Styling in Excel
• Introduction to Formulas
• Cell Referencing
• Formula Precedence
Outline • Using formula bar
• Use a name in a formula
• Basic Functions
Cell Styles
Cell Styles
1. On the Home ribbon click the ‘Cell Styles” button.
2. Select “New Cell Style”
3. Enter the name for the new style.
4. Check off which styles to include in the “Style Includes Area”
5. Click the format button.
6. Apply all the formatting features from the “Format Cells”
dialog box.
7. Click ok and save the style.
1 2 3
Always use Break down Use the Formula
parentheses complex formulas Evaluator tool (in
when in doubt. into smaller parts the Formulas
for clarity. tab) to step
through
calculations.
• A constant is a value that is not
calculated. For example, the date
10/11/2025, the number 210, and the
text "Quarterly Earnings" are all
constants.
Constant • An expression, or a value resulting
from an expression, is not a constant.
Values • If you use constant values in the
formula instead of references to the
cells (for example, =30+70+110), the
result changes only if you modify the
formula yourself.
• Using the Formula Bar
• Click on the cell under the Total Cost column (e.g., F2 for
John).
Using formula bar • In the Formula Bar, enter the formula to calculate the
total:
• Formula: =B2+C2+D2+E2
• Press Enter to calculate the total.
• Some simple functions available to us are listed below, and each requires a
range of cells passed in as a parameter (remember ranges are denoted by a
colon, i.e. A1:C4). The 'SUM' function will add up all the numbers in the
range, the 'AVERAGE' function will find the average, the 'COUNT' function
will count the number of non-empty cells in the range, and the 'MIN' and
'MAX' will return the minimum and maximum values in the range.
• =SUM(range)
• =AVERAGE(range)
• =COUNT(range)
• =MIN(range)
• =MAX(range)
Functions Types
• Mathematical Functions:
• =SUM(A1:A10) – Adds a range of numbers.
• =AVERAGE(A1:A10) – Calculates the average of a range.
• Logical Functions:
• =IF(A1>50, "Pass", "Fail") – Returns "Pass" if the condition is true,
otherwise "Fail".
• =AND(A1>0, B1<100) – Returns TRUE if all conditions are true.
• Text Functions:
• =CONCAT(A1, B1) – Combines text from two or more cells.
• =LEN(A1) – Returns the length of a text string.
=SUM(range)
=AVERAGE(range)
Simple
Mathematical =COUNT(range)
Functions
=MIN(range)
=MAX(range)
Formulas and Functions
• round
• ceiling
Other • floor
Functions • int
• mod
• rand
• ROUND(A2,2) → Rounds the
number in A2 to 2 decimal places.
• CEILING(A2, 0.1) → Rounds
A2 up to the nearest multiple of
0.1.
• FLOOR(A2, 0.1) → Rounds
A2 down to the nearest multiple
of 0.1.