A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Randomising" "number"



 
 
Thread Tools Display Modes
  #1  
Old February 9th, 2005, 07:07 PM
Leslie
external usenet poster
 
Posts: n/a
Default "Randomising" "number"

I have a worksheet, cells, b1, b2 and b3 of which each contains a 10-digit
hexadecimal number.

In another cell, I have the following formula: =mid(b1&b2&b3,3,26)

I have two questions about the above formula.

First, how may I change it so that the three 10-digit numbers will not
always be combined in the order b1, b2, b3, but will be combined in "random"
order?

Secondly, how may I change it so that the 30-digit number thus produced is
reduced to 26 by choosing "randomly" whether to begin the 26-digit number at
the 1st number of the 30 or a subsequent one?


  #2  
Old February 9th, 2005, 08:08 PM
Domenic
external usenet poster
 
Posts: n/a
Default

For your first question...

C1, copied down to C3:

=RAND()

Then, try the following...

=MID(INDEX(B1:B3,MATCH(SMALL(C1:C3,1),C1:C3,0))&IN DEX(B1:B3,MATCH(SMALL(C
1:C3,2),C1:C3,0))&INDEX(B1:B3,MATCH(SMALL(C1:C3,3) ,C1:C3,0)),3,26)

For your second question...

=MID(INDEX(B1:B3,MATCH(SMALL(C1:C3,1),C1:C3,0))&IN DEX(B1:B3,MATCH(SMALL(C
1:C3,2),C1:C3,0))&INDEX(B1:B3,MATCH(SMALL(C1:C3,3) ,C1:C3,0)),RANDBETWEEN(
1,3),26)

....which requires that you enable the Analysis ToolPak add-in (Tools
Add-ins check Analysis ToolPak)

Hit the F9 key for a new combination of random numbers (actually, I'm
not sure if it's the F9 key for the Windows version of Excel...I'm using
the Mac version).

Hope this helps!

In article ,
"Leslie" wrote:

I have a worksheet, cells, b1, b2 and b3 of which each contains a 10-digit
hexadecimal number.

In another cell, I have the following formula: =mid(b1&b2&b3,3,26)

I have two questions about the above formula.

First, how may I change it so that the three 10-digit numbers will not
always be combined in the order b1, b2, b3, but will be combined in "random"
order?

Secondly, how may I change it so that the 30-digit number thus produced is
reduced to 26 by choosing "randomly" whether to begin the 26-digit number at
the 1st number of the 30 or a subsequent one?

  #3  
Old February 9th, 2005, 09:45 PM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default

one way:

=MID(B1&B2&B3&B1&B3&B2&B2&B3&B1&B2&B1&B3&B3&B2&B1& B3&B1&B2,
30*INT(RAND()*6)+INT(RAND()*5)+1,26)

In article ,
"Leslie" wrote:

I have a worksheet, cells, b1, b2 and b3 of which each contains a 10-digit
hexadecimal number.

In another cell, I have the following formula: =mid(b1&b2&b3,3,26)

I have two questions about the above formula.

First, how may I change it so that the three 10-digit numbers will not
always be combined in the order b1, b2, b3, but will be combined in "random"
order?

Secondly, how may I change it so that the 30-digit number thus produced is
reduced to 26 by choosing "randomly" whether to begin the 26-digit number at
the 1st number of the 30 or a subsequent one?

  #4  
Old February 10th, 2005, 08:02 AM
Leslie
external usenet poster
 
Posts: n/a
Default

Thank you to both Domenic and JE McGimpsey for your replies to my queries.
I'm in the process of trying your suggestions.

"JE McGimpsey" wrote in message
...
one way:

=MID(B1&B2&B3&B1&B3&B2&B2&B3&B1&B2&B1&B3&B3&B2&B1& B3&B1&B2,
30*INT(RAND()*6)+INT(RAND()*5)+1,26)

In article ,
"Leslie" wrote:

I have a worksheet, cells, b1, b2 and b3 of which each contains a
10-digit
hexadecimal number.

In another cell, I have the following formula: =mid(b1&b2&b3,3,26)

I have two questions about the above formula.

First, how may I change it so that the three 10-digit numbers will not
always be combined in the order b1, b2, b3, but will be combined in
"random"
order?

Secondly, how may I change it so that the 30-digit number thus produced
is
reduced to 26 by choosing "randomly" whether to begin the 26-digit number
at
the 1st number of the 30 or a subsequent one?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum number of pages in a word document Travis75 Formatting Long Documents 5 January 27th, 2005 05:03 AM
custom number format cac General Discussion 1 January 24th, 2005 05:49 PM
Setting A Number Equal to Another Number slag018 General Discussion 1 October 19th, 2004 04:16 AM
large number, store and sort AHopper Database Design 3 August 20th, 2004 08:17 AM
Excel- Inserting a varying number of rows Ken Wright Worksheet Functions 1 March 20th, 2004 10:20 PM


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


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