Extra Class-2
Extra Class-2
SOLUTION
1. =COUNT(SalesRange)
2. =COUNTA(RegionRange) Numeric Sales
3. =COUNTIF(SalesRange, ">300")
4. =COUNTIF(RegionRange, "East") (COUNT)
5. =COUNTBLANK(SalesRange)
6. =COUNTIFS(SalesRange, ">200", SalesRange, "<600")
7. =COUNTIFS(RegionRange, "West", PerformanceRange, ">80")
QUESTIONS
1. How many numeric values are present in the Sales
column?
2. How many employees have a recorded Region?
3. How many employees have a Sales value greater than
300?
4. How many employees belong to the East region?
5. How many employees have missing Sales data?
6. Write a formula to count all employees whose Sales are
between 200 and 600.
7. Find out how many employees have a Performance
Score above 80 and belong to the West region.
ANSWER
Recorded
Sales > 300 East Region Missing Sales Sales 200-600
Region
(COUNTIF) (COUNTIF) (COUNTBLANK) (COUNTIFS)
(COUNTA)
Score > 80 & West
(COUNTIFS)
Student Name Score Comment %
Brian 274
Christian 280 QUESTION-1
Laura 237 Score Comment
Melissa 210 Over 249 Excellent
Mike 186 >=200 Good
Neal 240 >=150 Satisfactory
Peter 90 <150 Poor
Rachel 287
QUESTION-2
Score %
0-100 5%
101-200 10%
Over 200 15%
Summary of Key Functions Used
VLOOKUP Searches vertically for a value in the first column and
returns data from another column.
HLOOKUP Searches horizontally for a value in the first row and
returns data from a specified row.
INDEX Returns the value at a specific row and column in a range.
MATCH Returns the position of a value in a row or column.
INDEX + MATCH A powerful alternative to VLOOKUP for dynamic
lookups.
FUNCTION SYNTAX
1. =VLOOKUP("Emma",Table4[[Name]:[Region]],3,0)
2. =HLOOKUP("HR",Q5:T7,2,0)
3. =VLOOKUP(103,Table4,2,0) / =HLOOKUP(103,Q3:T4,2)
4. =INDEX(Table4[Name],2)
5. =MATCH("Mike",Table4[Name],0)
6. =INDEX(Table4[Region],MATCH(104,Table4[Employee ID],0))
7.=INDEX(J20:L29,MATCH("Michael",L20:L29,0),MATCH("Sales",J19:
L19,0)) / =INDEX(K20:K30,MATCH("Michael",L20:L30,0))
8. =INDEX(K20:K30,MATCH(TRUE,EXACT("MICHAEL",L20:L30),0))
Employee ID Name Department Salary Region
101 John Sales 50000 East
102 Sarah HR 60000 West
103 Mike IT 70000 North
104 Emma Finance 80000 South
Question Answer
1. Find the Salary of Emma.
2. Find the salary of the
employee in the "HR"
department.
3. Find the name of the
employee with ID 103.
4. Find the name of the 2nd
employee.
5. Find the row number of
"Mike".
6.Find the employee name
of IT department.
% Change = (Present-Previous)/Previous
Month Amount % Change
January $ 6,126 N/A
February 5,728
March 6,218
April 4,371
May 1,435
June 4,690
July 8,057
August 1,501
September 5,677
October 8,431
November 5,451
December 8,681
Marks Obtained
Q5 Q6 Q7
Highest Highest
Avergae of Less 2 mark average
in CT 1 Mark
1 2 3 4 5 6 7
2 2 2 2 2 2 2
Solution:
Task 1: Arithmetic Functions
Revenue:
Product X: =200 * 10.00 = 2000
Product Y: =150 * 15.00 = 2250
Product Z: =300 * 12.00 = 3600
Product W: =100 * 20.00 = 2000
Total Revenue:
=SUM(D2:D5) = 2000 + 2250 + 3600 + 2000 = 9850
Average Revenue:
=AVERAGE(D2:D5) = (2000 + 2250 + 3600 + 2000) / 4 = 2462.5
Maximum Revenue:
=MAX(D2:D5) = 3600
Minimum Revenue:
=MIN(D2:D5) = 2000
Task 2: Date & Time Functions
Days Until Restock for Product X:
=G2 - TODAY() (assuming TODAY() = 03/15/2025) → =01/10/2025 - 03/15/2025 = 300 days
Year from Stock Replenishment Date:
=YEAR(G2) → =YEAR(01/10/2025) = 2025
Month from Stock Replenishment Date:
=MONTH(G2) → =MONTH(01/10/2025) = 1
Day of the Week for Restock:
=TEXT(G2, "dddd") → "Saturday"
Days Between Ship Date and Restock:
=DATEDIF(TODAY(), G2, "d") → =DATEDIF(03/15/2025, 01/10/2025, "d") = 300 days
Task 3: Data Manipulation
Paste Special:
Copy the values from the Revenue column and paste them as values only in a new location.
Transpose Product Names:
Use =TRANSPOSE(A2:A5) to transpose product names from rows to columns.
Sort by Revenue:
Use Sort to arrange products in descending order of revenue.
Task 4: Conditional Functions
Categorize Products as High or Low Revenue:
=IF(D2 > 2000, "High Revenue", "Low Revenue")
High Revenue and High Profit:
=IF(AND(D2 > 2000, H2 > 150), "Yes", "No")
High Revenue or High Profit:
=IF(OR(D2 > 2000, H2 > 150), "Yes", "No")
Total Revenue for Products > $2000:
=SUMIF(D2:D5, ">2000") → =2250 + 3600 = 5850
Average Profit for Products > $2000 in Revenue:
=AVERAGEIF(D2:D5, ">2000", H2:H5) → (200 + 250) / 2 = 225
=IF(OR(D2 > 2000, H2 > 150), "Yes", "No")
Total Revenue for Products > $2000:
=SUMIF(D2:D5, ">2000") → =2250 + 3600 = 5850
Average Profit for Products > $2000 in Revenue:
=AVERAGEIF(D2:D5, ">2000", H2:H5) → (200 + 250) / 2 = 225
Stock Replenishment Date Sales Region Profit
45667 North 120
45693 South 200
45708 East 250
45717 West 150
0 = 9850
+ 2000) / 4 = 2462.5
= 5850
venue:
200 + 250) / 2 = 225
= 5850
venue:
200 + 250) / 2 = 225