Hello:
My data is something like this:
Column1 Column2 Flag
1 200 0
2 300 0
4 500 1
6 400 0
7 300 0
9 600 0

I need a formula to add values in each of the first two columns till
the flag equals 1. Then another formula to add the values below the
flag seperately.

In other words- I am expecting 7, 22, 1000, 1300 values to be output
for the above sheet.

The number of rows is not constant in my worksheet although the order
of the data is standard. I would want to avoid VBA if I can do this by
a simple formula.

Please help. This is Urgent.

Thanks in advance.

-Naveen