Lecture 01 Excel Basic and Functions
Lecture 01 Excel Basic and Functions
IF
Logical_test (required argument) – This is the condition to be tested and evaluated as either TRUE
or FALSE.
Value_if_true (optional argument) – The value that will be returned if the logical_test evaluates to
TRUE.
Value_if_false (optional argument) – The value that will be returned if the logical_test evaluates to
FALSE.
When using the IF function to construct a test, we can use the following logical operators:
= (equal to)
> (greater than)
>= (greater than or equal to)
< (less than)
<= (less than or equal to)
<> (not equal to)
example 1
10 12
Fail
example 2
Quantity 2
Total 60
Example 3
Example 4
Marks
85
79
90 fail
60 PASS A
80 fail D
75 fail B
S.no
1
2
3
4
5
6
VLOOKUP
example 2
product qty
Apple 100
Avacado 52
Pine Apple 0
Guava 0
lemon 52
Water malon 63
exmple 3
exmple 4
Commission Table
Sales Tiers Tier Minim Payout Rate
$0-$50,000 $0 $500
$50,001-$100,000 $50,001 $1,000
$100,001-$150,000 $100,001 $2,000
$150,001+ $150,001 $5,000
81 A+
71 B
30
HLOOKUP
* 5 7 10
6 8 11
0
or Arguments
number in table from which the matching value must be returned. The first column is 1.
er FALSE to find an exact match. Enter TRUE to find an approximate match. If this parameter is omitted, TRUE is the default.
Quantity
12 Order ID 10252
10
5 Product Grapes
9 UP 42.3
40 qty 40
Total 1692
Product guava
In stock No
Payout Rate
Payout Rate
4
0
0
10
Exmple 1
Order ID Product Unit Price
10247 Apples $14.00
10249 Oranges $9.80
10250 Bananas $34.80
10251 Pears $18.60
10252 Grapes $42.30
Order ID 10252
Product Grapes
Unit Price 42.3
Quantity 12
Total 507.6
Imagine you have an employee database where Column A lists Employee IDs, Column B lists employee names, and Column C lis
ID Names Email
10245 x x@gmail
14421 y Y@gmail
14254 z z@gmail
12457 h h@gmail
ID 12457
Name x
Email x@gmail
You want to check the stock level of a specific product by its Product ID and return a custom message based on the stock level f
Goal:
If the product is found and its stock level is below 10, return "Low Stock".
If the product is found and its stock level is 10 or above, return "Stock OK".
If the product is not found in the list, return "Product Not Found".
B C
Product Stock
Product ID
Name Level
1 Product A 25
2 Product B 8
3 Product C 15
4 Product D 3
5 Product E 12
Product ID 6
Stock check Product not found
oyee names, and Column C lists their email addresses. You want to find the email address of an employee given their Employee ID.
PMT -299
loan
intrest rate
period
Rs0.00
you have a loan of $10,000, with an annual interest rate of 5% (monthly interest rate of 5%/12), divided into principal and interest, as well
to be paid over 3 years (36 months). You want to create a table to see each payment amount and how it is
10000
5% annual
36 months 8%
10
1000
-Rs149.03
-Rs299.71
principal and interest, as well as the remaining balance.
Date Payment
16-Feb-01 -600 15%
5-Apr-01 100
15-Jul-01 100
22-Sep-01 100
22-Sep-02 100
22-Sep-03 100
22-Sep-04 100
22-Sep-05 100
22-Sep-06 100
22-Sep-07 100
22-Sep-08 100
22-Sep-09 100
12%
22%
97.29446
Suppose you have a grading system where:
10000 NO BONUS
10 2000
example 2
Quantity 2
Total 60
IF with and
22
15
FALSE
22
-15
FALSE
example 1
65 45
FALSE
example 2
Tax Calculator
Slabs
0 - 600000 No Tax
600001 - 1200000 5%
1200001 - 2400000 3000 & 10% above 2000000
Taxable A 2500000
FALSE
500000
500000
EXAMPE 3
example
10001 4 9 1000
10001 5 9 500
12000 6 8 200
8900 1 4 0
7800 1 4 0
IF(AND(A2>10000, B2<5,
C2>8), 1000,
IF(AND(A2>10000,
OR(B2<5, C2>8)), 500,
IF(A2>10000, 200, 0)))
3000 ,+ 50000 53000
<=600000),0,IF(AND(B17>=600001,B17<=1200000),(B17-600000)*D14,IF(AND(B17>=1200001,B17<2400000),3000+(IF(B17>2000000,(B17
Otherwise, no bonus.
),3000+(IF(B17>2000000,(B17-2000000)*10%)))))
COUNT 1 0
5 4
S 1
5
3 0
countA 9
count ali count how many sales figures in a list are greater than
coutif ali 500
ali 501
raza 490
khan 600
1 2
d
s
3
example 1
Jan feb mar
sales 1000 800 1200
month
jan
sales 1000
exampe 2
Employee
2 John Doe January February March April
3 Jane Doe Excellent Good Good Satisfactory
May June
Good Excellent
aset that contains monthly performance ratings for employees, and you want to determine their eligibility for a year-end bonus based on the
Date
year Month Day
2020 1 25 Saturday, January 25, 2020
2020 2 4 Tuesday, February 4, 2020
2020 5 812 Thursday, July 21, 2022
2020 6 3 Wednesday, June 3, 2020
2020 8 30 Sunday, August 30, 2020
2020 12 5 Saturday, December 5, 2020
weekday
month 1
2
7
6
8
12
example 1
IF with dates
example 2 You want to check if an employee's contract date is before or after a certa
you're managing a marketing campaign and want to check if a particular campaign start date in cell falls in the
of the year (January 1 - June 30). second half of the year.
return "S1", otherwise "S2" for the
"Valid" if it's after