# How to Calculate Sum If Cells Not Equal to Value in Excel

To calculate the sum of cells not equal to a specific value in Excel, you can use the SUMIF function. The SUMIF function allows you to add up the values in a range of cells based on specified criteria. In this case, the criteria will be "not equal to a specific value."

Here's a step-by-step guide on how to calculate the sum of cells not equal to a specific value in Excel:

- Open Excel and input your data in the worksheet. For this example, let's assume you have a list of numbers in column A (from A2 to A10) and you want to calculate the sum of those numbers, excluding any cell that contains the value 5.
- In an empty cell, type the formula
`=SUMIF(range, "<>value", sum_range)`

. Replace 'range' with the range of cells containing the criteria, 'value' with the specific value you want to exclude, and 'sum_range' with the range of cells to sum.

For our example, the formula would be `=SUMIF(A2:A10, "<>5", A2:A10)`

.

- Press Enter. Excel will calculate the sum of the cells in the specified range that are not equal to the specified value.

For our example, the result should be the sum of all the numbers in the range A2:A10, excluding any cell containing the value 5.

## Example

Let's consider the following dataset in column A:

```
A
1 Numbers
2 2
3 5
4 8
5 10
6 5
7 7
8 1
9 12
10 5
```

You want to calculate the sum of the numbers in column A (A2:A10), but exclude any cell containing the value 5.

- In an empty cell, enter the formula
`=SUMIF(A2:A10, "<>5", A2:A10)`

. - Press Enter. Excel will calculate the sum of the cells not equal to 5.

The result should be 40, as 2 + 8 + 10 + 7 + 1 + 12 = 40.