Which formula will calculate the number of blank cells in the range A1 A20?

The COUNTBLANK function returns a count of empty cells in a range. Cells that contain text, numbers, errors, spaces, etc. are not counted. Formulas that return an empty string ("") are counted as blank. COUNTBLANK takes just one argument, range, which must be a cell range.

Examples

In the example shown, the formula in cell E6 is:

=COUNTBLANK(B5:B15) // returns 3

COUNTBLANK returns 3 since there are 3 blank cells in the range. Note that cell B12 is not included because it contains a space character (" "). Cell B13 contains a formula that returns an empty string:

="" // formula in B13

COUNTBLANK considers B13 blank and includes it in the count.

Formulas that return empty strings

The IF function is often used to return empty strings. For example, if A1 contains 21, this formula in B1 will return an empty string:

=IF(A1>30,"Overdue","")

The idea is that that cell B1 should be empty unless the value in A1 is greater than 30. The COUNTBLANK function will indeed count B1 as empty when the value in A1 is less than or equal to 30. However it's worth noting that COUNTA and COUNTIFS will count B1 as not empty in the same case. In other words they will see the empty string ("") returned by IF as not blank.

Invisible characters

Some cells look empty, but actually contain invisible characters. To check which cells are blank use Go To > Special > Blanks:

A function is a predefined formula that performs calculations using specific values in a particular order. All spreadsheet programs include common functions that can be used for quickly finding the sum, average, count, maximum value, and minimum value for a range of cells. In order to use functions correctly, you'll need to understand the different parts of a function and how to create arguments to calculate values and cell references.

Watch the video below to learn more about using functions in Excel.

The parts of a function

In order to work correctly, a function must be written a specific way, which is called the syntax. The basic syntax for a function is an equals sign (=), the function name (SUM, for example), and one or more arguments. Arguments contain the information you want to calculate. The function in the example below would add the values of the cell range A1:A20.

Which formula will calculate the number of blank cells in the range A1 A20?

Working with arguments

Arguments can refer to both individual cells and cell ranges and must be enclosed within parentheses. You can include one argument or multiple arguments, depending on the syntax required for the function.

For example, the function =AVERAGE(B1:B9) would calculate the average of the values in the cell range B1:B9. This function contains only one argument.

Which formula will calculate the number of blank cells in the range A1 A20?

Multiple arguments must be separated by a comma. For example, the function =SUM(A1:A3, C1:C2, E2) will add the values of all cells in the three arguments.

Which formula will calculate the number of blank cells in the range A1 A20?

Using functions

There are a variety of functions. Here are some of the most common functions you'll use:

  • SUM: This function adds all the values of the cells in the argument.
  • AVERAGE: This function determines the average of the values included in the argument. It calculates the sum of the cells and then divides that value by the number of cells in the argument.
  • COUNT: This function counts the number of cells with numerical data in the argument. This function is useful for quickly counting items in a cell range.
  • MAX: This function determines the highest cell value included in the argument.
  • MIN: This function determines the lowest cell value included in the argument.

To use a function:

In our example below, we'll use a basic function to calculate the average price per unit for a list of recently ordered items using the AVERAGE function.

  1. Select the cell that will contain the function. In our example, we'll select cell C11.
    Which formula will calculate the number of blank cells in the range A1 A20?
  2. Type the equals sign (=) and enter the desired function name. In our example, we'll type =AVERAGE.
    Which formula will calculate the number of blank cells in the range A1 A20?
  3. Enter the cell range for the argument inside parentheses. In our example, we'll type (C3:C10). This formula will add the values of cells C3:C10 and then divide that value by the total number of cells in the range to determine the average.
    Which formula will calculate the number of blank cells in the range A1 A20?
  4. Press Enter on your keyboard. The function will be calculated, and the result will appear in the cell. In our example, the average price per unit of items ordered was $15.93.
    Which formula will calculate the number of blank cells in the range A1 A20?

Your spreadsheet will not always tell you if your function contains an error, so it's up to you to check all of your functions. To learn how to do this, check out the Double-Check Your Formulas lesson.

Working with unfamiliar functions

If you want to learn how a function works, you can start typing that function in a blank cell to see what it does.

Which formula will calculate the number of blank cells in the range A1 A20?

You can then type an open parenthesis to see what kind of arguments it needs.

Which formula will calculate the number of blank cells in the range A1 A20?

Understanding nested functions

Whenever a formula contains a function, the function is generally calculated before any other operators, like multiplication and division. That's because the formula treats the entire function as a single value—before it can use that value in the formula, it needs to run the function. For example, in the formula below, the SUM function will be calculated before division:

Which formula will calculate the number of blank cells in the range A1 A20?

Let's take a look at a more complicated example that uses multiple functions:

=WORKDAY(TODAY(),3)

Here, we have two different functions working together: the WORKDAY function and the TODAY function. These are known as nested functions, since one function is placed, or nested, within the arguments of another. As a rule, the nested function is always calculated first, just like parentheses are performed first in the order of operations. In this example, the TODAY function will be calculated first, since it's nested within the WORKDAY function.

Other common functions

There are many other functions you can use to quickly calculate different things with your data. Learning how to use other functions will allow you to solve complex problems with your spreadsheets, and we'll be talking more about them throughout this tutorial. You can also check out our articles below to learn about specific functions:

Which formula will calculate the number of blank cells in the range A1 A20 which formula will calculate the number of blank cells in the range A1 A20?

COUNTA. Count the number of cells in a range containing any text (text and numbers, not only numbers) and are not empty. For example, you could count the number of cells containing text in cells A1 through A20 using =COUNTA(A1:A20). If seven cells were empty, the formula would return the number "13" (20-7=13).

Which formula sums values in cells A1 & A2?

To create the formula: Type =SUM in a cell, followed by an opening parenthesis (.

Which is the correct formula for calculating the average from the range A1 to A20?

For example, if the range A1:A20 contains numbers, the formula =AVERAGE(A1:A20) returns the average of those numbers.

What is the sum of the cells A1 A2 A3 formula?

Using a formula like: =SUM(A1,A2,A3,B1,B2,B3)