sum qty if upcoming row is 0

aqeelnokia99

Board Regular
Joined
Dec 23, 2018
Messages
145
Office Version
  1. 2013
Platform
  1. Windows
i have a problem
mades upQTYSUM Result
5016
02
03
7410
06
335
02
99113
05
07
5526
04
55220
01
04
06
07

<tbody>
</tbody>

AS U SEE IF MADESUP UPCOMING ROW =0 OR EMPTHY ADD HIS QTY IN RE**** COLOMS
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello,

In cell C2, you can test following Array Formula:

Code:
=IF(A2=0,"",SUM(B2:OFFSET($B$1,IFERROR(MATCH(TRUE,(A3:$A$18)>0,0)+ROW()-1,SUMPRODUCT(MAX((ROW($A$1:$A$50))*($A$1:$A$50<>""))))-1,0)))

Hope this will help
 
Upvote 0
Wronge answer
HUq0CWy.png
 
Upvote 0

The formula was pointing at column A instead of column B

=IF(A2=0,"",SUM(B2:OFFSET($B$1,IFERROR(MATCH(TRUE,(A3:$A$18)>0,0)+ROW()-1,SUMPRODUCT(MAX((ROW($B$1:$B$50))*($B$1:$B$50<>""))))-1,0)))
 
Last edited:
Upvote 0
i past formula in colom c2 and get wrong answer whre i put it ?
 
Upvote 0
The formula as amended in post#4 works for me

Excel 2016 (Windows) 32 bit
A
B
C
1
mades up​
QTY​
2
50​
1​
6​
3
0​
2​
4
0​
3​
5
7​
4​
10​
6
0​
6​
7
3​
3​
5​
8
0​
2​
9
99​
1​
13​
10
0​
5​
11
0​
7​
12
55​
2​
6​
13
0​
4​
14
55​
2​
20​
15
0​
1​
16
0​
4​
17
0​
6​
18
0​
7​
Sheet: Sheet3
 
Upvote 0
The formula is an array formula & needs to be confirmed with Ctrl Shift Enter, not just enter
 
Upvote 0
with control +SHIFT + enter its work thanks u very much
 
Last edited:
Upvote 0
@Fluff

Thanks for pointing out how an Array Formula needs to confirmed ... :)
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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