TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #2974 7.87K
๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„๐—ฒ๐—ฟ: 
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!
  • โค 28
  • ๐ŸŽ‰ 1
More from @sqlspecialist
  1. Oct 7, 2026๐Ÿ“Š Kandinsky 6.0 Video: AI-Powered Content Creation for Analysts The new Kandinsky 6.0 Vidโ€ฆ
  2. Oct 7, 2026Alternatively, depending on the Excel version and requirement, I could use functions suchโ€ฆ
  3. Oct 7, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 5 Guys, let's continue our Data Analyst Interviewโ€ฆ
  4. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  5. Oct 7, 2026๐Ÿ”Ÿ What is the difference between UNION and JOIN? Sample Answer: "JOIN combines columns frโ€ฆ
  6. Oct 7, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 4 Guys, let's continue our Data Analyst Interviewโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’