#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Random Numbers

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Random Numbers

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


"bollard" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hmm hmm is offline
external usenet poster
 
Posts: 175
Default Random Numbers

=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.


"bollard" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Random Numbers

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting numbers divisible by 4 from random numbers in ascending order ramana Excel Worksheet Functions 6 June 19th 07 06:41 PM
I want random numbers generated without repeating numbers Johncobb Excel Worksheet Functions 2 September 7th 06 04:52 PM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"