Login Page - Create Account

Support Board


Date/Time: Fri, 14 Mar 2025 11:30:07 +0000



Post From: Nth Most Recent Non Zero Value

[2025-01-18 10:36:39]
User467141 - Posts: 3
Hiya,
I'm looking for a way to find the (variable)th most recent non zero value in spreadsheets. I have the Study "Swing High and Swing Low" loaded and would like to be able to make decisions based on that and some other factors. Therefore i need a column with the most recent non zero value (which is a function in spreadsheets) and a column with the nth most recent non zero value. Is it possible to adjust the function where mostrecentnonzerovalue(range,nth) is a possibility, so that it returns the nth most recent non zero value?

For example
0
0
0
10
0
0
20
0
0
40

If the function could be mostrecentnonzerovalue(A1:A10,1) the cell would show 10, if the function would be mostrecentnonzerovalue(A1:A10,2) the cell would show 20, mostrecentnonzerovalue(A1:A10,3) would show 40.
Or is there a workaround i don't know about yet?

Hope this makes my question clear!
Thanks in advance.