lookup, choose and sort

Suppose I have in a separate sheet in a workbook a very long column of random numbers. These are NOT produced by Rand() so using that function does not suit my needs in this case. Just take the long column of numbers as given.

In the worksheet I am working in I need to insert a number, n, of observations in a particular cell. Say, for example "25". Upon entering the value for n I need to automatically fill the adjacent column with any 25 numbers from the long column of random numbers in the other worksheet, sorted from lowest to highest.

When the value for n changes, then the adjacent column becomes a new set of n numbers picked from the long column of random numbers.

If this project is sufficiently interesting to someone I can provide a file. In it is a random number generator for non-normal Levy-stable random variates.

AttachmentSize
Spectral.xlsx691.95 KB
Vishesh's picture

Please provide the sample

Please provide the sample file

Did you get it?

Vishesh

Any chance you can help on the lookup, choose and sort routine I need?

RJB

Some detail that might be useful

The workbook has four risk aversion functions, one per each of the first four pages. One is convex, one is linear and the other two are step functions. On each page I provide the algebraic equation, a sample output and a graph with various shapes depending on the parameters. The trick is to reproduce the sample output in Excel and generalize it for any value of n. The functions all have two things in common: the sequence is non-increasing and the sum always adds to 1. For the two-step function the first parameter must be smaller than the second. The unknown is the number of rows required (n) which will change with the setting and the shape parameter which makes the curve more convex or the line steeper, depending on the equation.

Found it!!

I just posted it

RJB

I am looking...

...for the upload link. It was there for the original message but not now.