Sum of an Array Already Within An Array Formula Returning Zero

heyrobby

New Member
Joined
Oct 10, 2016
Messages
3
I have an array which is produced using the following:

{=(COUNT(OFFSET($I$2:$I$6,,(E9-(A15:A17)))))}

When I select 3 cells and enter this formula it produces the desired values. However, if I try to SUM or SUMPRODUCT this formula it returns zero.

Is this possible to SUM or SUMPRODUCT or is there an alternative method that I am missing?

Any help would be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi,

I'm a bit confused here.

Your original formula is being entered as a multi-cell array formula, i.e. over a region of three cells, correct?

So how are you entering your SUM/SUMPRODUCT version? Surely not also as a multi-cell array formula over three cells, which would not make any sense (since the results would be precisely the same as those produced by your original formula).

So I take it you're entering that version within just a single cell, in which case you'll need something like:

=SUMPRODUCT(SUBTOTAL(2,OFFSET($I$2:$I$6,,E9-A15:A17)))

We could also use COUNTIF here, i.e.:

=SUMPRODUCT(COUNTIF(OFFSET($I$2:$I$6,,E9-A15:A17),{">=0","<0"}))

In general, however, we need to switch to such functions (SUBTOTAL, COUNTIF) because, unlike COUNT, they can accept an array of range references.

Regards
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top