Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hasinque
 
Posts: n/a
Default Create 5 unique value between 1 and 14?


Hi, I am done. After 4 hours I cannot find an easy method to create 1000
rows with each row having 5 values. These value are unique and between 1
and 14.

So it looks like this
3 4 6 10 12
11 12 1 2 5
.........

please, there must be an easy solution. dont hate me for the lack of
brain.

thanks in advance.


--
hasinque
------------------------------------------------------------------------
hasinque's Profile: http://www.excelforum.com/member.php...o&userid=35387
View this thread: http://www.excelforum.com/showthread...hreadid=551625

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Create 5 unique value between 1 and 14?

Here is one way

Goto ToolsOptions and on the Calculation tab click the Iteration checkbox
(this will suppress circular reference messages)


Put this formula in A1, and copy across to E1. AT this stage they will all
show 0.

Copy A1:E1 down to however many rows.

=IF(($M$1="")+(AND(A10,COUNTIF($A1:$E1,A1)=1)),A1 ,INT(RAND()*14+1))

Then enter some value in M1, say x, and the random numbers will generate.

To force a re-calculation, clear cell M1, edit cell A1, don't change it,
just edit to reset to 0, copy A1 acrfoss to E1 and down, and re-enter a
value in M1.


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"hasinque" wrote in
message ...

Hi, I am done. After 4 hours I cannot find an easy method to create 1000
rows with each row having 5 values. These value are unique and between 1
and 14.

So it looks like this
3 4 6 10 12
11 12 1 2 5
........

please, there must be an easy solution. dont hate me for the lack of
brain.

thanks in advance.


--
hasinque
------------------------------------------------------------------------
hasinque's Profile:

http://www.excelforum.com/member.php...o&userid=35387
View this thread: http://www.excelforum.com/showthread...hreadid=551625



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hasinque
 
Posts: n/a
Default Create 5 unique value between 1 and 14?


many thanks.

however the formula is not working, it gives an error where it tests
whether A10.


--
hasinque
------------------------------------------------------------------------
hasinque's Profile: http://www.excelforum.com/member.php...o&userid=35387
View this thread: http://www.excelforum.com/showthread...hreadid=551625

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Create 5 unique value between 1 and 14?

Hello,

I suggest to:

1. Take my UDF UniqRandInt from
http://www.sulprobil.com/html/uniqrandint.html
Press ALT + F11, insert a module and copy my macro source code into
your module.

2. Select the 5 cells in your first row you want to fill and enter:
=UniqRandInt(14)
as array formula (enter with CTRL + SHIFT + ENTER)
The formula should be indentical in all your 5 cells and curly brackets
should appear.

3. Copy the row down as far as necessary.

HTH,
Bernd

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Create 5 unique value between 1 and 14?

It works fine. Did you check the Iteration box?

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"hasinque" wrote in
message ...

many thanks.

however the formula is not working, it gives an error where it tests
whether A10.


--
hasinque
------------------------------------------------------------------------
hasinque's Profile:

http://www.excelforum.com/member.php...o&userid=35387
View this thread: http://www.excelforum.com/showthread...hreadid=551625



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
how do i find unique avg buy prices in multiple group of buys/sell John Robbins Excel Worksheet Functions 1 May 4th 06 06:44 PM
create an array with unique items IN MEMORY Werner Rohrmoser Excel Worksheet Functions 1 September 25th 05 02:55 PM
Need to be done in 2 hours!!!! VLOOKUP returning #REF for unique I Kay Excel Worksheet Functions 10 August 19th 05 02:53 PM
Unique Values JohnGuts Excel Worksheet Functions 4 August 15th 05 08:52 PM
Use Julian Date To Create Serial Number antho10359 Excel Discussion (Misc queries) 4 December 9th 04 01:50 AM


All times are GMT +1. The time now is 03:53 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"