Hi, have been searching around but can't quite find something that I can apply to an issue we would like to crack!
We are trying to find a way to find the closest 3 smaller numbers and closest 3 larger numbers in our "Raw Data" compare to our "Work in Progress Data".
I've set out a working example below which shows the "Raw Data" and "WIP data" and what the answers should hopefully be.
(If it helps, we are on Microsoft 365 and the list should be about 20K rows.)
Raw Data
1
3
7
15
20
We are trying to find a way to find the closest 3 smaller numbers and closest 3 larger numbers in our "Raw Data" compare to our "Work in Progress Data".
I've set out a working example below which shows the "Raw Data" and "WIP data" and what the answers should hopefully be.
(If it helps, we are on Microsoft 365 and the list should be about 20K rows.)
Raw Data
1
3
7
15
20
WIP_Data | Next Higher in the Raw Data | 2nd Higher in the Raw Data | 3rd Higher in the Raw Data | Next Smaller in the Raw Data | 2nd Smaller in the Raw Data | 3rd Higher in the Raw Data |
---|---|---|---|---|---|---|
1 | 3 | 7 | 15 | #n/a | #n/a | #n/a |
2 | 7 | 15 | 20 | 1 | #n/a | #n/a |
6 | 7 | 15 | 20 | 3 | 1 | #n/a |
14 | 15 | 20 | #n/a | 7 | 3 | 1 |
18 | 20 | #n/a | #n/a | 15 | 7 | 3 |
25 | #n/a | #n/a | #n/a | 20 | 15 | 7 |