Hi everyone,

Hope you're all well.

I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT formula.

The formula is trying to count all the entries in "HRData" table, for the specified year and "Job Band".

If the job band selected is "All Employees" then count all the entries for the specified year.

If the job band selected is not "All Employees" then only count the selected "Job Band" for the specified year.

The formula only seems to work for "All Employees".

There are no "errors" for the formula.

I think the problem lies with the "else" part of the IF statement.

From what I can gather, the "else" part of the IF statement, is only reading one row of the table.

Here's the formula,

=SUMPRODUCT((YEAR(HRData[Start Date])=$A$8)*(IF($B$8="All Employees",TRUE(),HRData[Job Band]=$B$8)))

This is what my "HRData" table looks like.

There are 10,000 entries in the table.

I hope this makes sense.

Thanks for looking.

Mo

Hope you're all well.

I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT formula.

The formula is trying to count all the entries in "HRData" table, for the specified year and "Job Band".

If the job band selected is "All Employees" then count all the entries for the specified year.

If the job band selected is not "All Employees" then only count the selected "Job Band" for the specified year.

The formula only seems to work for "All Employees".

There are no "errors" for the formula.

I think the problem lies with the "else" part of the IF statement.

From what I can gather, the "else" part of the IF statement, is only reading one row of the table.

Here's the formula,

=SUMPRODUCT((YEAR(HRData[Start Date])=$A$8)*(IF($B$8="All Employees",TRUE(),HRData[Job Band]=$B$8)))

This is what my "HRData" table looks like.

There are 10,000 entries in the table.

I hope this makes sense.

Thanks for looking.

Mo