Values list

dtrom2002

New Member
Joined
Nov 15, 2017
Messages
4
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


A
B
C
D
E
F
G
1
2
1ST
2ND
3RD
4TH
5TH
3
-89.8
-89.8
-89.6
-35.2
-7.4
-15.5
4
22.4
-89.6
-35.2
-7.4
-15.5
-13.8
5
52.3
-89.6
-35.2
-7.4
-15.5
-13.8
6
1
-89.6
-35.2
-7.4
-15.5
-13.8
7
-89.6
8
-35.2
9
-7.4
10
-15.5
11
27.3

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi



In your example you show not the last but the first 5 values that are below zero from that row onwards.
Is that what you want?

no this is an example. I'd want to drag the queries down. There's around 7000 rows. Thanks
 
Upvote 0
no this is an example. I'd want to drag the queries down. There's around 7000 rows. Thanks

Sorry, if it's not the first 5 values then I don't understand.
If it's the last 5 values then they will be the same, it doesn't matter if you are at row 3 or row 500, the last 5 values that are below zero from that row onwards will always be the same.

I hope someone else understands what you need and posts a suggestion.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,538
Members
449,236
Latest member
Afua

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