Lecture 2
Lecture 2
LECTURE 3
1
What is the Formula in Excel?
An Excel formula is nothing but an introductory statement consisting of one or more 'operands'
and 'operators’
To specify the relationship between the values recorded within the cells
2
What is the Formula in Excel?
One essential point: we must always start them with an equal sign (=)
3
The Difference between a Formula and Function
There is another term that is very familiar to Excel formulas, and that is "function”
Meanwhile, functions are used to perform complex calculations that cannot be done manually
4
The Difference between a Formula and Function
There is another term that is very familiar to Excel formulas, and that is "function”
Meanwhile, functions are used to perform complex calculations that cannot be done manually
5
The Difference between a Formula and Function
6
How to create a formula in Excel?
Choose a cell
Enter the address of a cell in the selected cell or select a cell from the list
Press Enter
7
How to create a formula in Excel?
8
Creating Formulas Using Cell References
If the values are recorded in than two cells, we can use the cell reference of each cell similarly
For example, if we have values in cells A1, B1, and C1, we can add their corresponding values
using the formula =A1+B1+C1
However, if several cells are required in a formula, it is better to try using existing functions and
ranges of cells
9
Creating Formulas Using Cell References
10
Creating Formulas using the Pre-defined
Functions
Using the Function Wizard to create a formula:
We need to navigate the Formulas tab and click on the 'Insert Function' button under the
'Function Library' section, which will launch the 'Insert Function' window
11
Creating Formulas using the Pre-defined
Functions
we can also use the 'fx' button from the left side of the formula bar to insert the desired function
in a cell
12
Creating Formulas using the Pre-defined
Functions
In the Insert Function window:
13
Creating Formulas using the Pre-defined
Functions
When we are not sure of the function's name, we must manually select the category to which our
function may belong
The list has about 14-16 different categories, and all the existing Excel functions are divided into
them accordingly
14
Typing/ Writing a formula into a
Cell or formula bar
15
Excel Formulas and
Functions
16
SUM
The SUM() function, as the name suggests, gives the total of the selected range of cell values
17
SUMIF
We use the SUMIF function to sum the values in a range that meets the criteria that you specify
For example, suppose that in a column that contains numbers, we want to sum only the values that
are larger than 5
Sample Formula:=SUMIF(B2:B25,">5")
18
AVERAGE
19
AVERAGEIF
Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria.
Range: Required One or more cells to average, including numbers or names, arrays, or references that
contain numbers
Criteria: Required
Average_range: Optional The actual set of cells to average; If omitted, the range is used
20
COUNT
The function COUNT() counts the total number of cells in a range that contains a number
It does not include the cell, which is blank, and the ones that hold data in any other format apart
from numeric
To count the number of blank cells present in a range of cells, COUNTBLANK() is used
21
COUNTA
The COUNTA function counts the number of cells that are not empty in a range
22
COUNT VS. COUNTA
The COUNTA function counts cells containing any type of information, including error values and
empty text ("")
For example, if the range contains a formula that returns an empty string, the COUNTA function
counts that value
If you do not need to count logical values, text, or error values, use the COUNT function
23
COUNTIF
Use COUNTIF, one of the statistical functions, to count the number of cells that meet a criterion
for example, to count the number of times a particular city appears in a customer list
24
SUBTOTAL
Depending on what you want, you can select either average, count, sum, min, max, min, and others
25
Function_num Function
(includes (ignores
hidden rows) hidden rows)
1 101 AVERAGE
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
SUBTOTAL 6 106 PRODUCT
26
MODULUS
The MOD() function works on returning the remainder when a particular number is divided by a
divisor
Let’s now have a look at the examples below for a better understanding
27
POWER
The function “Power()” returns the result of a number raised to a certain power
28
CEILING
Returns number rounded up, away from zero, to the nearest multiple of significance
29
CEILING
Regardless of the sign of the number, a value is rounded up when adjusted away from zero
If the number is negative, and the significance is negative, the value is rounded down, away from
zero
If the number is negative, and the significance is positive, the value is rounded up towards zero
30
CEILING
31
FLOOR
Contrary to the Ceiling function, the floor function rounds a number down to the nearest multiple of
significance
32
FLOOR
If the number is positive and significance is negative, FLOOR returns the #NUM! error value
If the sign of the number is positive, a value is rounded down and adjusted toward zero
If the sign of the number is negative, a value is rounded down and adjusted away from zero
33
FLOOR
34
Creating Formulas Using Defined Names
Instead of using the cell references/ ranges in the formula directly, we can also specify a desired
name for the specific cells/ range and use it later in our formula
However, we can also define a name for the entire range, usually called Named Range
To manage (define, view, edit, or delete) any name for the cell(s) or a range, we must go to Formulas
> Name Manager
35
NOW
The NOW() function in Excel gives the current system date and time
The result of the NOW() function will change based on your system date and time
36
TODAY
The YEAR() function, as the name suggests, returns the year from a date value
37
TIME
The TIME() function converts hours, minutes, and seconds given as numbers to an Excel serial
number, formatted with a time format
38
HOUR, MINUTE, SECOND
The HOUR() function generates the hour from a time value as a number from 0 to 23
39
HOUR, MINUTE, SECOND
The function MINUTE(), returns the minute from a time value as a number from 0 to 59
40
DATEDIF
The DATEDIF() function provides the difference between two dates in terms of years, months, or
days
An example of a DATEDIF function is where we calculate the current age of a person based on two
given dates, the date of birth and today’s date
41
DATEDIF
Syntax: DATEDIF(start_date,end_date,unit)
start_date: A date that represents the first, or starting date of a given period
end_date: A date that represents the last, or ending, date of the period
42
VLOOKUP
As the name specifies, VLOOKUP is a built-in Excel function that helps you look for a specified value
by searching for it vertically across the sheet
VLOOKUP in Excel may sound complicated, but you will find out that it is a very easy and useful tool
once you try it
43
VLOOKUP
Note: The column which holds the data used to lookup must always be to the left
44
VLOOKUP
The input is the number of the column, counted from the left:
45
How to use VLOOKUP
Select a cell
Type =VLOOKUP
Type (,)
46
How to use VLOOKUP
Type (,)
Type the number of the column, counted from the left (2)
Hit enter
47