# Google Sheets: How to Check if Multiple Cells are Equal

You can use the following formula in Google Sheets to check if the values in multiple cells are equal:

```=AND(ARRAYFORMULA(B2={C2,D2,E2}))
```

This particular formula checks if the values in cells B2, C2, D2, and E2 are all equal.

If they are all equal, the formula returns TRUE. Otherwise it returns FALSE.

The following example shows how to use this formula in practice.

## Example: Check if Multiple Cells are Equal in Google Sheets

Suppose we have the following dataset in Google Sheets that shows the number of points scored by various basketball players during four different games: We can type the following formula into cell F2 to check if the points values in each of the games for player A are all equal:

`=AND(ARRAYFORMULA(B2={C2,D2,E2}))`

We can then click and drag this formula down to each remaining cell in column F: The formula returns TRUE if the values in all four games are equal and FALSE otherwise.

For example, player A scored 10 points in all four games so the formula returned TRUE.

However, player B did not score the same number of points in all four games so the formula returned FALSE.

If you would like to return values other than TRUE and FALSE, you can wrap the formula in an IF function.

For example, you can use the following formula to instead return the values Equal and Not Equal:

`=IF(AND(ARRAYFORMULA(B2={C2,D2,E2})), "Equal", "Not Equal")`

The following screenshot shows how to use this formula in practice: The formula now returns Equal if the values in all four games are equal and Not Equal otherwise.