๐๐ป๐๐ฒ๐ฟ๐๐ถ๐ฒ๐๐ฒ๐ฟ:
You have 2 minutes to solve this Excel problem.
You have the following data:
Employee Department Salary
John IT 75,000
Sarah HR 60,000
Mike IT 82,000
David IT 78,000
Alice HR 65,000
How would you count the number of employees in the IT department?
๐ ๐ฒ: Challenge accepted! ๐ช
=COUNTIF(B2:B6,"IT")
๐ก Explanation:
The COUNTIF() function counts the number of cells that meet a specific condition.
โข B2:B6 is the range containing department names.
โข "IT" is the condition (criteria).
โข Excel counts all rows where the department is IT.
This challenge tests your understanding of:
โ
COUNTIF()
โ
Conditional Counting
โ
Data Analysis
๐ฏ Expected Output Example
Formula Result
=COUNTIF(B2:B6,"IT") -> 3
(John, Mike, and David belong to the IT department.)
๐ Bonus (Using a Cell Reference as Criteria)
=COUNTIF(B2:B6,E2)
If cell E2 contains IT, the formula becomes dynamic and automatically updates when the value in E2 changes.
๐ COUNTIF() is one of the most commonly used Excel functions. After mastering it, practice:
โข COUNTIFS()
โข SUMIF()
โข SUMIFS()
โข AVERAGEIF()
โข AVERAGEIFS()
These functions are essential for reporting, dashboards, and Excel interviews.
โค๏ธ React with โค๏ธ for more interview challenges!
Post #2974
7.87K
- โค 28
- ๐ 1