Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 298
Default Finding and Adding

Hi,

Have a problem hopefully I can get some help with. I need a formula to find
the last positive number in a row and then add that and all the numbers that
come after it.

Example:

-10 100 -10 -20 60 -10 -20

I need the formula to locate the 60 and then add 60+(-10)+(-20)

Thanks in advance!

Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Finding and Adding

Hi Rich,

Assume your data is in A1:A7
In A2 enter this formula:
=IF(A10,0,A1)
In B2, enter this formula:
=IF(B10,0,A2+B1)
copy this formula to the right as far as you need

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Rich" wrote in message ...
| Hi,
|
| Have a problem hopefully I can get some help with. I need a formula to find
| the last positive number in a row and then add that and all the numbers that
| come after it.
|
| Example:
|
| -10 100 -10 -20 60 -10 -20
|
| I need the formula to locate the 60 and then add 60+(-10)+(-20)
|
| Thanks in advance!
|
| Rich


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Finding and Adding


Although not perfect given there could be all positive numbers something on
these lines would give you the result :

=SUM(OFFSET($A$1,MATCH(2,1/(--(A1:A70))),,ROW(A7))) array entered
(ctrl+shift+enter)


"Rich" wrote:

Hi,

Have a problem hopefully I can get some help with. I need a formula to find
the last positive number in a row and then add that and all the numbers that
come after it.

Example:

-10 100 -10 -20 60 -10 -20

I need the formula to locate the 60 and then add 60+(-10)+(-20)

Thanks in advance!

Rich

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
Finding * FARAZ QURESHI Excel Discussion (Misc queries) 1 April 3rd 08 08:50 AM
Finding The MAX Value carl Excel Worksheet Functions 6 July 25th 07 09:36 PM
Finding a value by adding certain sums in a range? Meh27 Excel Discussion (Misc queries) 2 July 16th 07 09:02 PM
Finding a match and adding to the statement ben simpson Excel Discussion (Misc queries) 4 March 21st 06 03:51 PM
finding the last value Simon Shaw Excel Discussion (Misc queries) 8 January 16th 05 10:02 AM


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

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

About Us

"It's about Microsoft Excel"