Home |
Search |
Today's Posts |
#1
|
|||
|
|||
how to add consecutive positive numbers
Hi, I have an urgent question: say i have the following data: a1 = -1, a2 = 0, a3 = -2, a4 = 1, a5 = 2, a6 = -1, a7 = -2, a8 = 5, a9 = -1, a10 = 1 I want to add the first consecutive positive numbers. How do I write a formula for it? What I want Excel to do is to go through this and add a4 and a5, that is it. Those are the first cosecutive numbers that appear in the data set. -- shreen_farhad ------------------------------------------------------------------------ shreen_farhad's Profile: http://www.excelforum.com/member.php...o&userid=27736 View this thread: http://www.excelforum.com/showthread...hreadid=472445 |
#2
|
|||
|
|||
Try this in B2 and copy down: =IF(AND(MAX(B$1:B1)=0,MIN(A1:A2)0,A2=A1+1),A1+A2, "") -- Cutter ------------------------------------------------------------------------ Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848 View this thread: http://www.excelforum.com/showthread...hreadid=472445 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare Negative & Positive Numbers | New Users to Excel | |||
Find Median of Positive numbers only in Range | Excel Worksheet Functions | |||
how do I rank negative and positive numbers? | Excel Worksheet Functions | |||
add only positive numbers and avg in a column | Excel Worksheet Functions | |||
How can I change positive numbers to negative, i.e. change 50 to - | Excel Discussion (Misc queries) |