How to select random numbers from 500 numbers in excel 2010?
-
what formula do i use if i want to select 30 random numbers from 500 numbers in excel 2010?
-
Answer:
Enter the numbers 1 to 500 in column A. In col B enter =RAND() and copy down to match col A. IN C1 enter =INDEX(A:A, MATCH(SMALL (B:B,ROWS($1:1)),B:B,0)) copy down to row 30 If you need to record the list turn off Autocalculate. Press F9 to pick next 30.
Raghav at Yahoo! Answers Visit the source
Other answers
Assuming your numbers are in cells A1:A500, the following event handler will create a new list of 30 random numbers in cells C1:C31, on every 'double click'. If your numbers are not in column "A", change the "A" reference in the code below to your column letter, i.e. "F", "M", etc. If you wish your list of numbers to be returned in a column other than 'C', modify the code: Change the "C1" reference to your column letter, i.e. "F1", "M1", etc. Change the "C" reference to your column letter, i.e. "F", "M", etc. Change the "C:C" reference to your column letter, i.e. "F:F", "M:M", etc. Then, copy the modified event handler to the clipboard (highlight the entire code, right click inside the highlighted area, and 'Copy'): Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Dim i Range("C1").Value = "30 Random Numbers" For i = 2 To 31 rNum = Application.RoundUp(Rnd() * 500, 0) Range("C" & i).Value = Range("A" & rNum).Value Next i Columns("C:C").AutoFit End Sub Select the worksheet containing the list of numbers and right click the sheet tab at the bottom. Select 'View Code' Paste the event handler into the white editing area to the right (right click in the area and 'Paste') Close the VBE (red button w/white 'x'). To create the list, double click any cell. To create a new list, double click again. The numbers will not change unless you double click any cell.
garbo7441
Related Q & A:
- How to select all articles and their similar articles from MySQL?Best solution by Stack Overflow
- How to generate cryptographically random numbers?Best solution by Stack Overflow
- How to select specific filenames nested within several folders?Best solution by Geographic Information Systems
- How to select specific data from listbox?Best solution by stackoverflow.com
- How to insert or select random ID's to CC or BCC, in the New Yahoo mail version?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.