Forum Discussion
MaKo3060
Jun 18, 2024Copper Contributor
Formula for finding product of factors.
I am looking for a formula to calculate the product of cells a1, b2 and c3. The formula should only calculate the cells with value greater than 0. If a cell is 0, it must not be included in the calcu...
MaKo3060
Jun 18, 2024Copper Contributor
Riny_van_Eekelen
Jun 18, 2024Platinum Contributor
Well, that is totally different set-up compared to what you described, but it should work the same.
Or perhaps you should change whatever formula you have to calculate the factors. If the result is zero, return the number 1 or an empty string ""
- MaKo3060Jun 18, 2024Copper Contributor
The preceding was a principled example. In reality, the situation is this:
Factors A, B, and C are calculated individually with separate formulas; the result for a random factor can be 0. Everything takes place on the same row.
If a factor has the value 0, the product will also be 0; therefore, only factors greater than 0 must be included in the calculation of the product.- Riny_van_EekelenJun 18, 2024Platinum Contributor
MaKo3060 My goodness! Why didn't you give a realistic example from the start?
Try this then:
=PRODUCT(IF(D3>0,D3,1),IF(H3>0,H3,1),IF(L3>0,L3,1))- MaKo3060Jun 18, 2024Copper ContributorI am sorry about that.
I had an expectation that there was a dynamic function which reads the value in 3 specific cells and only includes the cells where the value is greater than 0 in the calculation. So if 2 cells are greater than 0, only these 2 are included in the calculation.
That doesn't seem to be the case; the references to cells in a formula are static and a value of 0 must be manipulated to be 1.
But anyway, thanks for the help.