Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Calculating Cell Values with Formulas

This guide will walk you through some of the most common Excel formulas like SUM, PRODUCT, AVERAGE, and more.

Sep 14, 2020 • 11 Minute Read

Introduction

In this guide, you will learn how to calculate cell values using various functions in Microsoft Excel 2019.

Excel formulas allow users to perform calculations on large amounts of data in a very short time and simplified manner. For an example, what if a teacher wants to calculate the average grade scored by thousands of students in a subject? It would take him hours to calculate the average using a calculator, but through Excel, a simple drag of cells containing grades and a simple formula can do the work in a few seconds. Excel formulas play an important role in the lives of students, auditors, business professionals, an many others.

There are various functions present in the Excel 2019 version to calculate cell values:

  • SUM
  • PRODUCT
  • AVERAGE
  • COUNT & COUNTA
  • IF
  • MAX & MIN
  • TRIM
  • DEC2BIN

This guide will walk through each of these functions.

SUM Function

The SUM function is used to add values from multiple cells. Here's the syntax:

      =SUM(n1, n2, n3, ...)
    

Consider the example given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
110353213423=SUM(B1:E1)?
21222551321=SUM(B2, C2, D2, E2)?
388501512=SUM(88, 50, 15, 12)?
4625717343=SUM(B4, D4)?
515511187=SUM(B2:E2, B5:E5)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
110353213423=SUM(B1:E1)3600
21222551321=SUM(B2, C2, D2, E2)519
388501512=SUM(88, 50, 15, 12)165
4625717343=SUM(B4, D4)79
515511187=SUM(B2:E2, B5:E5)683

PRODUCT Function

As the name suggests, all the numbers passed inside the PRODUCT function gets multiplied. Here's the syntax:

      =PRODUCT(n1, n2, n3, ...)
    

Consider the example given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=PRODUCT(B1:E1)?
2222531=PRODUCT(B2:E2, 3)?
385052=8 * 50 * 5 * 2?
467173=PRODUCT(C4, E4)?
5155118=PRODUCT(B2:E2, B5:E5)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=PRODUCT(B1:E1)2457
2222531=PRODUCT(B2:E2, 3)20460
385052=8 * 50 * 5 * 24000
467173=PRODUCT(C4, E4)21
5155118=PRODUCT(B2:E2, B5:E5)45012000

AVERAGE Function

If you want to calculate the arithmetic mean of given numbers, use the AVERAGE function. Here's the syntax:

      =AVERAGE(n1, n2, n3, ...)
    

Consider the example given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=AVERAGE(B1:E1)?
2222531=AVERAGE(B2:E2, 3)?
367173=PRODUCT(C3:E3)?
4155118=PRODUCT(B2:B4)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=AVERAGE(B1:E1)10
2222531=AVERAGE(B2:E2, 3)12.6
367173=PRODUCT(C3:E3)9
4155118=PRODUCT(B2:B4)14

COUNT & COUNTA Function

The COUNT function is used "to get the number of entries in a number field that is in a range or array of numbers," whereas the COUNTA function "counts the number of cells that are not empty in a range," according to Excel's documentation.

The COUNT and COUNTA functions have the following syntax:

      =COUNT(n1, n2, n3, ...)
=COUNTA(n1, n2, n3, ...)
    

Consider the example given below to understand the use of COUNT and COUNTA functions better:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=COUNT(B1:E1)?
2222531=COUNTA(B2:E2)?
367 NAME=COUNT(B3:E3)?
4TOM511 =PRODUCT(B4:E4)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=COUNT(B1:E1)4
2222531=COUNTA(B2:E2)4
367 NAME=COUNT(B3:E3)2
4TOM511 =COUNTA(B4:E4)3

IF Function

When you have a logical condition that can either be true or false, use the IF function. The IF function has the following syntax:

      =IF(condition, response_on_true, response_on_false)
    

Consider the example given below to understand this function:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=IF(B1 > D1, C1, FALSE)?
2222531=IF(NOT(B2 = E2), TRUE, FALSE)?
385052=IF(B3 > 20, C1, D1)?
467173=IF(C4 = E4, TRUE, FALSE)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=IF(B1 > D1, C1, FALSE)FALSE
2222531=IF(NOT(B2 = E2), TRUE, FALSE)TRUE
385052=IF(B3 > 20, C1, D1)5
467173=IF(C4 = E4, TRUE, FALSE)FALSE

MAX & MIN Function

You can rely on the MAX and the MIN functions to return the maximum and minimum value from a range of values respectively. Here's the syntax for both the functions:

      =MAX(n1, n2, n3, ...)
=MIN(n1, n2, n3, ...)
    

Consider the example given below to understand the use of both of the functions:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=MAX(B1:E1)?
2222531=MIN(B1:B4)?
367173=MAX(B1:E4)?
4155118=MIN(B1:E4)?

After applying the formula, the result column will be updated as given below:

ABCDEFG
Sr. NumberValue1Value2Value3Value4FormulaResult
1133213=MAX(B1:E1)21
2222531=MIN(B1:B4)6
367173=MAX(B1:E4)31
4155118=MIN(B1:E4)2

TRIM Function

The TRIM function "removes all spaces from text except for single spaces between words," according to Excel's documentation.

The TRIM function has the following syntax:

      =TRIM(text_with_unwanted_spaces)
    

Consider the example given below to understand the functionality better:

ABCD
Sr. NumberTEXTFORMULARESULT
1APPLE=TRIM(" APPLE ")?
2I AM A DOCTOR=TRIM(" I AM A DOCTOR ")?
3GRADES=TRIM("GRADES")?

After applying the function, the result column will be updated as given below:

ABCD
Sr. NumberTEXTFORMULARESULT
1APPLE=TRIM(" APPLE ")"APPLE"
2I AM A DOCTOR=TRIM(" I AM A DOCTOR ")"I AM A DOCTOR"
3GRADES=TRIM("GRADES")"GRADES"

DEC2BIN Function

The DEC2BIN function is used "to convert a decimal number to binary," according to Excel's documentation. The DEC2BIN function has the following syntax:

      =DEC2BIN(num, char_required)
    

You can convert a Decimal number to either Binary/Octal/Hex with formulas available in Excel and also vice versa with a slight modification to the formula. Consider an example below to illustrate this:

ABCDE
Sr. NumberDECIMALBINARYHEXOCTAL
14=DEC2BIN(B1)=DEC2HEX(B1)=DEC2OCT(B1)
2120=DEC2BIN(B2)=DEC2HEX(B2)=DEC2OCT(B2)
2356=DEC2BIN(B3)=DEC2HEX(B3)=DEC2OCT(B3)

After applying the formulas, the result will be updated as shown below:

ABCDE
Sr. NumberDECIMALBINARYHEXOCTAL
1410044
2120111100017078
2356101100100544164

Similarly, you can convert Binary to Decimal/Octal/Hex, Hex to Decimal/Octal/Binary and Octal to Decimal/Binary/Hex.

Conclusion

In this guide, you have learned a few of the formulas that calculate cell values, but there are hundreds more Excel formulas you can explore in Excel to make your work a lot easier. You may also like to look at the following guides on Excel topics: