Excel For data analytics: Basic functions and
formulas (Part 1)
1. SUM Function
Definition:
The SUM function is used to add up a range of numbers in Excel. It is one of the most frequently
used functions for performing quick calculations.
Syntax:
excel
=SUM(number1, number2, …)
or
=SUM(range)
• number1, number2, … → Individual numbers to sum.
• range → A selection of multiple cells to sum.
Example:
Example 1: Summing Individual Numbers
=SUM(10, 20, 30)
Output: 60 (10 + 20 + 30)
Example 2: Summing a Range
=SUM(A1:A5)
If A1 = 5, A2 = 10, A3 = 15, A4 = 20, A5 = 25, the sum is 75.
2. AVERAGE Function
Definition:
The AVERAGE function calculates the mean (arithmetic average) of a set of numbers.
Syntax:
=AVERAGE(number1, number2, …)
=AVERAGE(range)
Example 1: Calculating the Average of Numbers
=AVERAGE(10, 20, 30, 40, 50)
Output: 30 → (10+20+30+40+50) / 5
Example 2: Calculating the Average of a Range
=AVERAGE(A1:A5)
If A1 = 12, A2 = 15, A3 = 20, A4 = 25, A5 = 18, the output is 18.
3. MIN Function
Definition:
The MIN function returns the smallest value from a list or range of numbers.
Syntax:
=MIN(number1, number2, …)
or
=MIN(range)
Example:
=MIN(10, 5, 20, 3, 15)
Output: 3 (since 3 is the smallest number)
4. MAX Function
Definition:
The MAX function returns the largest value from a list or range of numbers.
Syntax:
=MAX(number1, number2, …)
or
=MAX(range)
Example:
=MAX(10, 5, 20, 3, 15)
Output: 20 (since 20 is the highest number)
5. COUNT Function
Definition:
The COUNT function counts the number of numeric values in a range.
Syntax:
=COUNT(range)
It only counts numeric values, ignoring blank cells and text.
Example:
If A1 = 10, A2 = 20, A3 = "Text", A4 = "", A5 = 50, then:
=COUNT(A1:A5)
Output: 3 (Only counts numbers: 10, 20, and 50)
6. COUNTA Function
Definition:
The COUNTA function counts all non-empty cells, including numbers, text, and special characters.
Syntax:
=COUNTA(range)
Example:
If A1 = 10, A2 = "Hello", A3 = "", A4 = 30, A5 = "Excel", then:
=COUNTA(A1:A5)
Output: 4 (Counts non-empty cells: 10, "Hello", 30, and "Excel")
7. COUNTIF Function
Definition:
The COUNTIF function counts the number of cells that meet a specified condition.
Syntax:
=COUNTIF(range, criteria)
• range → The set of cells to check.
• criteria → The condition to apply.
Example:
Example 1: Counting Numbers Greater than 50
=COUNTIF(A1:A10, ">50")
If the numbers in A1:A10 are {10, 60, 75, 40, 90, 30, 50, 20, 85, 100}, the result is 5
(as five numbers are greater than 50).
Example 2: Counting Specific Text
=COUNTIF(A1:A10, "Passed")
Counts how many cells contain the word "Passed".
8. SUMIF Function
Definition:
The SUMIF function adds up values based on a condition.
Syntax:
=SUMIF(range, criteria, sum_range)
• range → The range where the condition is checked.
• criteria → The condition to match.
• sum_range → The range of numbers to sum (if different from range).
Example:
Example 1: Summing Numbers Greater than 50
=SUMIF(A1:A10, ">50", B1:B10)
Sums values from B1:B10 only where corresponding values in A1:A10 are greater than 50.
Example 2: Summing Based on Text
=SUMIF(A1:A10, "Passed", B1:B10)
Sums values in B1:B10 where A1:A10 contains "Passed".
9. AVERAGEIF Function
Definition:
The AVERAGEIF function calculates the average of values that meet a specified condition.
Syntax:
=AVERAGEIF(range, criteria, average_range)
• range → The range where the condition is checked.
• criteria → The condition to match.
• average_range → The range of numbers to average.
Example:
Example 1: Averaging Sales Above 5000
=AVERAGEIF(A1:A10, ">5000", B1:B10)
Averages values from B1:B10 only where A1:A10 has values greater than 5000.
Example 2: Averaging Based on Category
=AVERAGEIF(A1:A10, "Electronics", B1:B10)
Averages sales in B1:B10 only for rows where A1:A10 contains "Electronics".
Conclusion
These functions are essential for data analysis, reporting, and decision-making in Excel.
• SUM, AVERAGE, MIN, MAX → Basic calculations.
• COUNT, COUNTA → Counting data entries.
• COUNTIF, SUMIF, AVERAGEIF → Applying conditions to calculations.