Suppose I have the following table in sheet *month*:

And the following table in sheet *__data*:

In sheet *__data* I'd like to sum all the values from column P,R,T,V and X, for the given category name.

For a single row, I know I can use the following formula: (cat6 for example)

```
=IF(
SUMIF(month!$O$5:$O$34;__data!$A7;month!$P$5:$P$34)<>0;
SUMIF(month!$O$5:$O$34;__data!$A7;month!$P$5:$P$34);
"")
```

Now, I believe this should be possible with `SUMPRODUCT`

. But I can't wrap my head around how this should be coded.

I have this SUMPRODUCT formula, but this results in an `#VALUE!`

error;

```
=SUMPRODUCT(
--(month!$O$5:month!$O$34=__data!$A7);
(
month!$P$5:month!$P$34 +
month!$R$5:month!$R$34 +
month!$T$5:month!$T$34 +
month!$V$5:month!$V$34 +
month!$X$5:month!$X$34)
)
```

I believe that this has something to do with the way how the values in P,R,T,V and X are populated. This is done with the following formula;

```
=IF(SUMIF($B$5:$B$123;O8;$D$5:$D$123)<>0;SUMIF($B$5:$B$123;O8;$D$5:$D$123);"")
```

`=IF(ISTEXT(__gegevens!B18);__gegevens!B18;"")`

. So you're saying that that's the problem?