# array formula

#### chang ym

##### New Member
a1 cell: =AND(ISNUMBER(F3),F3=0)*E6
a2 cell: =AND(ISNUMBER(G3),G3=0)*E7
a3 cell: =AND(ISNUMBER(H3),H3=0)*E8

and then,,
=sum(a1:a3)

can i this procedure with one formula?

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
maybe =SUMPRODUCT(AND(ISNUMBER(F3:H3),(F3:H3=0))*(E6:E8)) entered with ctrl+shift+enter instead of just enter

Here is a non-array entered version:

=SUMPRODUCT(--(ISNUMBER(F3:F5)),--(F3:F5=0),E6:E8)

And on reflection maybe this is more appropiate:

=SUMIF(F3:F5,"0",E6:E8)

Given that the criteria range is a horizontal range (F3:H3) and the sum range is a vertical one (E6:E8) then neither SUMIF or SUMPRODUCT will work here because in those functions the ranges need to be the same size and shape (in SUMIF if that isn't the case then the range used for the sum will actually alter to be different to the one given).

You can either use TRANSPOSE function like this

=SUM(IF(F3:H3=0,IF(ISNUMBER(F3:H3),TRANSPOSE(E6:E8))))

confirmed with CTRL+SHIFT+ENTER

....or you can use MMULT function which doesn't require "array entry"

=MMULT((F3:H3=0)*ISNUMBER(F3:H3),E6:E8)

Given that the criteria range is a horizontal range (F3:H3) and the sum range is a vertical one (E6:E8)

I didn't even spot that!

thanks, very happy!
the perfect worked ! barry...

Replies
9
Views
191
Replies
2
Views
90
Replies
2
Views
209
Replies
0
Views
311
Replies
6
Views
130

1,196,476
Messages
6,015,436
Members
441,895
Latest member
Zululander

### 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.

### Which adblocker are you using?

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

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