ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMPRODUCT NON-CONTINOUS CELL (https://www.excelbanter.com/excel-worksheet-functions/222862-sumproduct-non-continous-cell.html)

HARSH BAHAL

SUMPRODUCT NON-CONTINOUS CELL
 
I want ot enter a formula in cell A20 which should be the sumproduct of range
A1 to A19 & of coloumn B1 to B19 but to exclude some cells from both
coloumns, conditionality being if there are no figures in any of the cell
(cell value being 0). Thus if cell A5=0, to ignore both cell A5 & B5.
pL help.
Thanks in anticipation

Mike H

SUMPRODUCT NON-CONTINOUS CELL
 
Try

=SUMPRODUCT((A1:A19<0)*(A1:A19)*(B1:B19))

Mike

"Harsh Bahal" wrote:

I want ot enter a formula in cell A20 which should be the sumproduct of range
A1 to A19 & of coloumn B1 to B19 but to exclude some cells from both
coloumns, conditionality being if there are no figures in any of the cell
(cell value being 0). Thus if cell A5=0, to ignore both cell A5 & B5.
pL help.
Thanks in anticipation


driller

SUMPRODUCT NON-CONTINOUS CELL
 
Harsh,

if my recollection is correct, u can try this while u imagine ignoring the
rows with 0's in it

A20 =sumproduct(A1:A19,B1:B19)

sidenote:

Thus if cell A5=0, to ignore *both* cell A5 & B5.


0 x anynumber = 0 , thus the resulting SUM of the *valued* PRODUCTS from the
pair of range (A1:B19) will be correct on A20.

--
regards

"Harsh Bahal" wrote:

I want ot enter a formula in cell A20 which should be the sumproduct of range
A1 to A19 & of coloumn B1 to B19 but to exclude some cells from both
coloumns, conditionality being if there are no figures in any of the cell
(cell value being 0). Thus if cell A5=0, to ignore both cell A5 & B5.
pL help.
Thanks in anticipation



All times are GMT +1. The time now is 09:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com