I have the following formula that works when the ranges have more than 1 row, but generates a #VALUE error if there is only 1 row and one of the factors is blank.

```
=SUMPRODUCT(cost, units)
Cost Units
1 1
2 1
```

The result is 3.

```
Cost Units
1
2
```

The result is 0.

```
Cost Units
1 1
```

The result is 1.

```
Cost Units
1
```

The result is `#VALUE`

.

I can prevent the error by wrapping the formula in an IFERROR:

```
=IFERROR((SUMPRODUCT(cost, units)), 0)
```

Why does the SUMPRODUCT not work with only one row? Is there a better way to handle this than the IFERROR wrapper?