random sequence of numbers

How do I generate a random sequence of numbers?  e.g. 
simulating pulling the numbers 1 through 25 out of a hat.
0
9/30/2003 2:52:40 PM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
392 Views

Similar Articles

[PageSpeed] 47

One way:

Put the numbers 1 through 25 in A1:A25. Put this in B1 and copy down 
to B25:

    =RAND()

Select any cell in the A1:B25 and choose Data/Sort. Sort on column B 
(ascending or descending, doesn't matter) with no headers. If you 
need to save the sequence copy A1:A25 to a different location.

Since RAND() will recalculate after the sort, you can get another 
random sequence by choosing Data/Sort again.


In article <1eb301c38762$7f1fef90$a301280a@phx.gbl>,
 "Joe" <j.m.dempsey@verizon.net> wrote:

> How do I generate a random sequence of numbers?  e.g. 
> simulating pulling the numbers 1 through 25 out of a hat.
0
jemcgimpsey (6723)
9/30/2003 3:21:34 PM
Hi Joe,

Try:

=randbetween(1,25)

HTH,
Raj

AnalysisWorks Inc
Evidence-Based Analytic Consulting	
www.analysisworks.net

Download a free Excel Box Plot add-in:
http://www.analysisworks.net/downloads.htm#BoxPlotPro

"Joe" <j.m.dempsey@verizon.net> wrote in message news:<1eb301c38762$7f1fef90$a301280a@phx.gbl>...
> How do I generate a random sequence of numbers?  e.g. 
> simulating pulling the numbers 1 through 25 out of a hat.
0
rsingh (6)
9/30/2003 8:21:07 PM
Caveat:

Since RandBetween() will produce duplicates within a data set, it 
doesn't meet the OP's criterion of "simulating pulling the numbers 1 
through 25 out of a hat"

In article <1b99605c.0309301221.1d71d18@posting.google.com>,
 rsingh@analysisworks.net (Raj Singh) wrote:

> Try:
> 
> =randbetween(1,25)
0
jemcgimpsey (6723)
9/30/2003 8:32:31 PM
put the numbers 1 to 25 in column A.

next to them put the formula

=rand()

then sort both columns using the column with the formula as a key.

This will give you a rand pick of the 25 numbers.

-- 
Regards,
Tom Ogilvy


"Joe" <j.m.dempsey@verizon.net> wrote in message
news:1eb301c38762$7f1fef90$a301280a@phx.gbl...
> How do I generate a random sequence of numbers?  e.g.
> simulating pulling the numbers 1 through 25 out of a hat.


0
twogilvy (1078)
10/1/2003 7:50:08 PM
Reply:

Similar Artilces:

numbering #4
Is there any system of 'outline numbering' in Excel? Hope i'm not asking for too much! -- Dr. Sachin Wagh MBBS, DHA, DPH Nothing as easy as the outlining within MSWord. Typing the numbers is one way (not very appealing). Using a formula based on the values in the other cells may work--if you can pickout something that would indicate the level--not very nice, either. Dr. Sachin Wagh wrote: > > Is there any system of 'outline numbering' in Excel? Hope i'm not asking for > too much! > -- > Dr. Sachin Wagh > MBBS, DHA, DPH -- Dave Peterson ...

Number Format Problem
I am importing data from a program at work. The data come in in th format of ###@##(three numbers, a letter, and then 2 more numbers). The problem is that when a code such as 123E04 is imported, exce thinks it means 1.23E+04. This is a problem becasue the data I need i the E04 part. (I use the RIGHT(cell,3) formula to get the portion want.) Any ideas on how to get the number in the format I want? have tried changing the cell characteristics, and all kinds of stuff. Thank -- kola556 ----------------------------------------------------------------------- kola5567's Profile: http://...

random number generator
hi there i don't know if this is the right section, however I was wondering is there some vba or formulae to generate random numbers in a certain range I would be very greatful if you can help me Thanks Owen -- manclad ------------------------------------------------------------------------ manclad's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30016 View this thread: http://www.excelforum.com/showthread.php?threadid=497074 I like J.E. McGimpsey's =RandInt(). http://www.mcgimpsey.com/excel/udfs/randint.html manclad wrote: > > hi there ...

Need trailing zeroes to show for range of numbers....
The file I pulled into Excel for some reason cut off 2 trailing zeroes, no matter how I format it they will not show up. There are thousands of them and I can't see typing in each one over just to get two zeroes on the end. Does anyone know of a way to format this so they will show up? I have searched Microsoft online with no help. Not too much information, but try this (after saving your workbook!) In an empty cell enter the numner 100. Edit>Copy Select your data Edit>Paste Special, check Multiply -- Kind Regards, Niek Otten Microsoft MVP - Excel "Sueshe" &...

count the number of new lows within a range of cells
Hello, Is there a formula or method to count the number of new lows within a range of cells? For example, the following are in col A rows 5 to 14. Within this set a new low has been reached 3 times- (96,95,94). What I would like is a formula or macro that that would produce the results - 3. There are about 9000 rows of data and I am looking for "count of new lows within the preceding 10 rows" on a rolling basis. Thanks. 100 101 96 97 98 97 95 97 94 95 Version 1: Use this if the 9000 or so rows don't have blanks in them. In this version you just need to select the first cel...

Formula reads date as number
I have a formula that reads a list of dates in cells K5 through K20 an compares these dates to 1 date in cell M3. Cell M3 shows a date bu when I run the evaluate formula auditing tool on the formula, M3 date shows as a number, thus the formula fails. Any hel -- pete576 ----------------------------------------------------------------------- pete5761's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2961 View this thread: http://www.excelforum.com/showthread.php?threadid=49423 Dates are stored as number of days since 1-1-1900. So today (dec 16,2005) is stored as...

maximum number of indexes per SQL table that Access (jet) can deal with?
why is there a maximum number of indexes per SQL table that Access (jet) can deal with? is it really the count of indexes + statistics? I've seen plenty of documentation that states that typically DSS systems have twice as much index space as data space.. So I don't think that it's a case of 'over-indexing' I'm just tired of a crippled Jet front end and other people making me 'temporarily drop my indexes' so that they can link to my tables using Jet. has this bug gone away with Access 2007? Is it going away with Access 2010? ...

Exchange server rebooting randomly
Hello, My exchange 2000 sp3 server is experiencing ramdom reboots. In the event log I get an error 5000 from lsasrv. I did not experiece this error before in the test enviroment. I reinstalled the server the same way when we installed it in our production enviroment. The only difference is that I installed Exchange rollup update post SP3. Has anyone have anidea what might be the problem. Thanks Bernard "Bernard M." <BernardM@discussions.microsoft.com> wrote: >My exchange 2000 sp3 server is experiencing ramdom reboots. In the event log >I get an error 5000 from ...

excel putting random cells into date format
I opened a new spreadsheetand started inputting data. About 100 lines into a very simple sheet of only 3 columns the numbers started turning inot dates all by them selves. I highlighted the cells and reformatted to the general formatting and it immediately went back to the date format. Additionally, when I printede the spreadsheet it printed pages and pages of blank gridlined sheets until I realized it and turned off the printer. THen when I saved the file it was 7meg! This file had 5 pages, 3 colums each and no more than 300 rows each. I cut and pasted the data into a spreadsh...

Restart numbering ater a set number of rows
I have an excel spreadsheet with 4 columns. the first two columns contains numbers which will never change the third column starts off with 0 (zero) and is repeated for 255 rows then on the 256 row it needs to change to 1 (so basically increment by 1 every 255 rows) the fourth column starts at 0 (zero) and counts up to 255 but then needs to reset it self back to 0 on the 256 row. Help Please!!!!!:confused: ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ One way: I...

Adding an apostrophe to a column of numbers
Hello, I need to add an apostrophe to each cell in a long column of numbers. I do not want to format them as text or format them as custom - our system requires the apostrophe at the beginning of the cell. My question is - is there a way to format one cell with the apostrophe and then copy that apostrophe down to the other cells?? or can someone write me something that will allow me to do it quickly? I want to avoid having to go into each cell and put the apostrophe in! Thank you in advance.... One way. Change 9 to your column Sub addapostophe() mc = 9 'column I For i = ...

How do I insert a specific number in a gantt bar
Hi I,m attempting to insert a specific number into a gantt bar or edit default text in the format box. Any body help? Hi GarryB, I'm not sure I understand completely what you are trying to do. I'm guessing edit the information which shows next to the bars on the Gantt chart? Insert a custom field into the table through Insert > Column and pick on of the text columns. Enter the value you want to show. Then Format > Bar Styles. Select the bar type and on the Text tab, select the custom field. I hope this helps. Let us know how you get along. Julie Pr...

Mutliple Page Number sets
I'm setting up a book to go out to short run press. Using publisher because I get it through license for super cheap, so it didn't make sense to purchase an expensive publishing suite. But I want to do some things with the page numbers that I can't figure out to do. I want and intro and foreword to be in roman numerals, and then the main body of the text to have regular page numbers. What I really can't figure out though, is how to get the page numbers to start on "1" with the first page (currently starting on 11. I have Master Sheets applies to the differ...

From VBA: How to select a column by column number instead of letter? #2
I'm in MS Access and don't know from column letters - all my constants are in terms of column number. I'd like to select, say, column number 7 and hide it.... ? -- PeteCresswell Gord and I sent you a macro solution for EXCEL as this is an Excel ng. -- Don Guillett SalesAid Software donaldb@281.com "(Pete Cresswell)" <x@y.z> wrote in message news:uch701tveuot081n0q0h9rpq1r0c24v1sc@4ax.com... > I'm in MS Access and don't know from column letters - all my constants are in > terms of column number. > > I'd like to select, say, column number...

CRM should allow auto numbering of the products
---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=9c8e0ba6-f37a-4fc1-84fd-ff5b578e2c76&dg=microsoft.public.crm ...

PO next number changes randomly GP10
Hello, The company I currently work for has been seeing the next PO number being changed in the purchase order processing screen. This occurs randomly. To try to determine the cause of this, I have turned on the activity tracking as well as sql triggers on the pop40100 table. Has anyone else seen this before or have any suggestions on how to determine what is causing this to change? Any help would be greatly appreciated. Thank you, JC Hi JC when you say it is changing what do mean? I believe that the PO numbers will go back and fill in for PO's that have been deleted. I.E. i...

create a cell that accumulates, numbers from another cell...
I need to know how to have a entery cell that can send number values to a cell that accumilates there sum .the entries in the entery cell can be changed and the recieving cell just keeps adding up. The entry cell can be left blank and the sum remains in recieving cell. -- Thanks sombull http://www.mcgimpsey.com/excel/accumulator.html -- Regards, Peo Sjoblom "sombull" <sombull@discussions.microsoft.com> wrote in message news:41021B44-363C-418C-9A4F-6CD126431698@microsoft.com... > I need to know how to have a entery cell that can send number values to a > cell ...

OWA 2003 number of emails viewable
Hello, I was wondering if anyone knew where to set the number of viewable emails in OWA? By default it does not allow very many to be displayed. Thanks, Greg It's 25 by default. In OWA, click the Options button and then check the 'Messaging Options' section. There's an option called 'Number of items to display per page'. -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchangeblog.com "Greg" <anonymous@discussions.microsoft.com> wrote in message news:107801c47b40$76dd3b30$a401280a@phx.gbl... > Hello, > I...

Lowest number excluding zero
I have five columns for each vendor and I am trying to determine who has the lowest price out of the seven vendors. The data is not in an array. The critical data would be in i.e. cells: T20, Z20, AF20, AL20, AQ20 and AV20. I want to calculate the lowest price excluding zero out of those cells. I experimented by putting numbers into B4, C5, D6 and E7 I used Insert | Name | Define (in XL 2003) to define MYDATA to refer to =Sheet1!$B$4,Sheet1!$C$5,Sheet1!$D$6,Sheet1!$E$7 In XL 2007 use Formulas | Define names | Define Name Then In a cell I typed =MIN(mydata) and it returned the low...

Form of phone numbers in contact list
I am using Blackberry's Desktop Software to syncronize with my MS Outlook Contacts list. The onboard caller-id function of the phone that is supposed to correlate the incoming phone number to a name of a contact (should the number be in my contacts list) isn't working. According to help from Blackberry the problem is the "form" of the numbers as they're being loaded on the Blackberry from MS Outlook. Specifically, apparently the fact that the numbers are stored in the form of (###) ###-#### instead of something like ###-###-#### is keeping the phone from realizi...

change a text format to number format
I need to link to someone elses table but they have used a different format type for a field called ACCOUNT. I am a beginner and do not know how to write SQL but I was wondering if it is possible to use an update query to change a text field in this situation into a number format. I am trying to run a mismatch query on this table with another table in my database that has a field called ACCOUNT but my table has a number format. I am trying to come up with a list of ACCOUNT numbers that are common in both tables. Thank you in advance for any direction you can provide Let...

number to words
Is there a way in excell to change a number in a cell to a word format? For example, the number 1000 will changed to one thousand pesos. Hi Try doing a Google search and you'll find many macros/procedures to convert numbers to text. Below a short list for this topic: MS Knowledge Base: http://support.microsoft.com/default.aspx?scid=KB;EN-US;213360 http://support.microsoft.com/default.aspx?scid=KB;EN-US;140704& Free Addin MOREFUNC-DLL which includes a UDF for this task (for various languages): http://longre.free.fr/english/ or have a look at http://www.bygsoftware.com/examples/zipfil...

Changes to Autofill Numbering
Hi, I have a database that has a key field that is a unique number, where records are added, this field increments the number by one. There are several thousand records with that run from 1 to 9654 albeit many of the records have been deleted and thus there are huge gaps in the number. We have a requirement to renumber the existing records from 1 to 2010 (2010 is the number of live records) but because the table that the number is held is linked to other tables on the field and Autofill is set in the properties, we don't appear to have a means to alter the numbering. Any ideas w...

Page Numbering in Locked Template
I have a word locked template form which I have inserted the page numbering. When someone is completing the form and they have a lot of information the document goes from 3 pages to 4 pages, yet the page numbering on the last page will not change. It is page x of y field but the last page still reads 4 of 3. Please help, thanks. I have got the number of pages working now, but the first page of the document is not to have numbering on it and it doesn't. So this is working. The problem is that if this first page which does not have numbering on it (company only page) a...

Pivot Tables
What is the diffence between "Count Numbers" and "Count" in Pivot Tables? I am finding that "Count Numbers" in Pivot tables is like "Count" in formulas, and "Count" in Pivot tables is like "CountA" in formulas. Is this true? I think you have it! It's like what you find in the statusbar, too. RS wrote: > > What is the diffence between "Count Numbers" and "Count" in Pivot Tables? I > am finding that "Count Numbers" in Pivot tables is like "Count" in formulas, ...