## COUNTA

This function will return the number of cells that are not empty. It checks whether cells contain any type of value, such as text, number, dates or even errors. It doesn’t count cells that are blank.

Take a look at the example below.

We will use the following formula.

1 |
=COUNTA(A1:E2) |

Each cell in the range from **A1** to **E2,** except cell **D2,** is not empty, so the result is **9**.

## COUNTBLANK

The function opposite to **COUNTA** is **COUNTBLANK.** It counts only cells that are empty.

Only cell **D2** is empty, so the result is **1**.

## COUNTIF

There is another, more complicated example. Using this function, you can count **both blank and non-blank cells**.

In order to count **non-blank** cells use the following formula.

1 |
=COUNTIF(A1:E2,"<>"&"") |

To count **blank cells**, change **“<>”** to **“=”**.

1 |
=COUNTIF(A1:E2,"="&"") |

This is our final result.