Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
shreen_farhad
 
Posts: n/a
Default 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   Report Post  
Cutter
 
Posts: n/a
Default


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare Negative & Positive Numbers chom New Users to Excel 3 July 28th 05 08:26 AM
Find Median of Positive numbers only in Range MichaelC Excel Worksheet Functions 4 June 24th 05 03:06 AM
how do I rank negative and positive numbers? Anna Excel Worksheet Functions 1 April 6th 05 12:36 AM
add only positive numbers and avg in a column rich Excel Worksheet Functions 6 March 10th 05 09:19 AM
How can I change positive numbers to negative, i.e. change 50 to - godwingi Excel Discussion (Misc queries) 5 February 28th 05 05:41 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"