Sum of values with irregular row intervals. for Sierra Charts

mescalante48

New Member
Joined
Sep 15, 2021
Messages
29
Office Version
  1. 2007
Platform
  1. Windows
Good day everyone, this is for the uni.

the values on columns (A) and (B) are generated at irregular intervals, I would need to sum the most recent non zero value in the (B) column to the most recent non zero value in column (A) and return the sum of that to the (C) column.

no arrays, no VBA

see the example below.
what would be the formula in (C)?



e696857b9594afb3994da311e49a8a61.png
 
Last edited by a moderator:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Is this for Excel, or some other app?
 
Upvote 0
Book1 (version 1).xlsb
ABC
101641516419.82
2000
3000
44.8200
5016414.516419.32
64.8200
7000
801641716421.82
9000
104.8200
Sheet4
Cell Formulas
RangeFormula
C1:C10C1=IF(B1=0,0,B1+INDEX($A$1:$A$10,SMALL(IF($A$1:$A$10>0,ROW($A$1:$A$10)),COUNTIF($B$1:B1,">0"))))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
I made a few assumptions, but here's another option:

Book1
ABC
101641516419.82
2000
3000
44.8200
5016414.516419.32
64.8200
7000
801641716421.82
9000
104.8200
Sheet13
Cell Formulas
RangeFormula
C1:C10C1=IF(B1=0,0,B1+INDEX(A:A,MIN(IF(A1:A10,ROW(A1:A10)))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I think you'll find this is for Sierra charts, in which case you've both wasted your time.
 
Upvote 0
It was fun to solve and to see Eric W's take. It's never a waste of time for me.

The OP may have wasted HIS time if this doesn't translate to Sierra Charts.
 
Upvote 0
=IF(B1=0,0,B1+INDEX(A:A,MIN(IF(A1:A10,ROW(A1:A10)))))
I made a few assumptions, but here's another option:

Book1
ABC
101641516419.82
2000
3000
44.8200
5016414.516419.32
64.8200
7000
801641716421.82
9000
104.8200
Sheet13
Cell Formulas
RangeFormula
C1:C10C1=IF(B1=0,0,B1+INDEX(A:A,MIN(IF(A1:A10,ROW(A1:A10)))))
Press CTRL+SHIFT+ENTER to enter array formulas.
this should work even on the Sierra chart, nevertheless, it returns #ARGS! if B1>0

I'm contacting the SC support team with this solution and hopefully, they will tell me why is not working.

I'm super thankful for your willingness to share your knowledge.
 
Upvote 0
this should work even on the Sierra chart, nevertheless, it returns #ARGS! if B1>0

I'm contacting the SC support team with this solution and hopefully, they will tell me why is not working.

I'm super thankful for your willingness to share your knowledge.

Eric,

SC support replied.

my understanding from their response is that the IF function's calculation logic and/or default behavior might differ from software to software, that being said; could you please explain what IF(A1:A10,ROW(A1:A10)) is doing within your formula?, maybe I can replace it with something that'll do the same but different.

thx!
 
Upvote 0

Forum statistics

Threads
1,223,355
Messages
6,171,610
Members
452,411
Latest member
sprichwort

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