Random Numbers

B

bollard

I have a spreadsheet where, in one column there is a number. The next column
holds a list of random numbers. I want the sheet to look at the number in the
first column and then select that number of entries from the random number
column to use.

e.g. if the number in the first colum is 5, it will select the first 5
random numbers from the next column.

Can anyone help, please?

Keith
 
B

Bernie Deitrick

Keith,

What do you mean by "Select"? Do you want a macro that selects cells, a function that does something
to that number of cells, or something else entirely?

HTH,
Bernie
MS Excel MVP
 
H

hmm

=OFFSET(B:B,,,A1)

where A1 contains the number of entries and column B is the list of entries.

If the complete formula will return multiple values (like the one above), it
is an array formula and you will need to enter it in multiple cells and hit
Ctrl + Enter after typing it. Good luck.
 
B

Bernd P

Hello,

=B1:INDEX(B:B,A1)

is non-volatile - meaning that it does not recalculate each time you
press F9 unless A1 changes.

Regards,
Bernd
 
Top