I have a list of values (Column A). Against each value, I want to know the last 5 values that are below zero from that row onwards.
For example:
I want queries in Columns C to G that I can drag down. As the query drags down, I want the values to appear.
If this helps, the values in column A go as far as about row 12000.
I am therefore guessing that I will end up with separate queries in columns C to G…
An example sheet is showing below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1ST
[/TD]
[TD]2ND
[/TD]
[TD]3RD
[/TD]
[TD]4TH
[/TD]
[TD]5TH
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]-89.8
[/TD]
[TD][/TD]
[TD]-89.8
[/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]22.4
[/TD]
[TD][/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
[/TD]
[TD]-13.8
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]52.3
[/TD]
[TD][/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
[/TD]
[TD]-13.8
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
[/TD]
[TD]-13.8
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]-89.6
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]-35.2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]-7.4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]-15.5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]27.3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
For example:
I want queries in Columns C to G that I can drag down. As the query drags down, I want the values to appear.
If this helps, the values in column A go as far as about row 12000.
I am therefore guessing that I will end up with separate queries in columns C to G…
An example sheet is showing below
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1ST
[/TD]
[TD]2ND
[/TD]
[TD]3RD
[/TD]
[TD]4TH
[/TD]
[TD]5TH
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]-89.8
[/TD]
[TD][/TD]
[TD]-89.8
[/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]22.4
[/TD]
[TD][/TD]
[TD]-89.6
[/TD]
[TD]-35.2
[/TD]
[TD]-7.4
[/TD]
[TD]-15.5
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