Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T Harris
 
Posts: n/a
Default Filter unique random number

Using 75 cells down begining with A1 and B1, I have random number between
1-75 in B column and corresponding letters of the word BINGO to appear
accordingly in the A column. Thanks to three people in this forum, this is
working. Now when I hit F9, the BINGO results are displayed in the first
75 rows of the A and B columns.

Now, how do I filter the 75 results to weed out duplicates like "B12"? (OR
another solution which may be the best is) How do I generate the 75 unique
solutions so that no duplicates appear in the first place? If anyone has an
answer to either question, I would appreciate it very much. I tried
ADVANCED FILTER and could not get it to work and output my unique results to
another location. Thanks.

T Harris


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Filter unique random number

"T Harris" wrote:
Using 75 cells down begining with A1 and B1,
I have random number between 1-75 in B column
and corresponding letters of the word BINGO to
appear accordingly in the A column. [....] Now
when I hit F9, the BINGO results are displayed in
the first 75 rows of the A and B columns.
[....] How do I generate the 75 unique solutions
so that no duplicates appear in the first place?


How automatic do you want this to be? One
approach, following McGimpsey's suggestion
with an important correction:

A1: =MID("BINGO", INT((B1-1)/15)+1, 1)
A2: copy A1
B1: 1
B2: 2
C1: =RAND()
C2: copy C2

Copy A1:C2 (2 rows, 3 columns) down thru C75.
Note that B will contain constants 1-75.

Use Data Sort to sort A1:C75 based on C1.
Repeat this sort each time after you press F9.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Filter unique random number

I wrote:
"T Harris" wrote:
Now when I hit F9, the BINGO results are displayed
in the first 75 rows of the A and B columns.

[....]
Use Data Sort to sort A1:C75 based on C1.
Repeat this sort each time after you press F9.


Since you are using F9, I ass-u-me-d you selected
manual calculation under Tools Options Calculation.

If not (if you still use automatic calculation), you can
simply use Data Sort instead of pressing F9. The
order of C1 will look odd, but A1:B75 will be ordered
randomly, properly paired.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Filter unique random number

.. How do I generate the 75 unique solutions
so that no duplicates appear in the first place?


One play to try ..

Sample construct available at:
http://www.savefile.com/files/3005009
FilterUniqueRandom_THarris_wks.xls

Put in

A1:
=INDEX(B:B,RANK(D1,$D$1:$D$75))&INDEX(C:C,RANK(D1, $D$1:$D$75))

B1:
=VLOOKUP(INT((ROW(A1)-1)/15)+1,{1,"B";2,"I";3,"N";4,"G";5,"O"},2,0)

C1: =ROW(A1)
D1: =RAND()

Select A1:D1, copy down to D75

A1:A75 will return a unique random shuffle of all the 75 alpha-numbers
(B1 - O75). Pressing F9 will regenerate a fresh shuffle.

You might also be interested in this "Bingo Board" program file
which was put together (based on code from Tom Ogilvy)
and posted a few months back:

Link: http://savefile.com/files/5028169
Bingo_Board_v2_Random_Draw_without_Replacement.xls
(Its easy and fun to use !)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"T Harris" wrote in message
...
Using 75 cells down begining with A1 and B1, I have random number between
1-75 in B column and corresponding letters of the word BINGO to appear
accordingly in the A column. Thanks to three people in this forum, this

is
working. Now when I hit F9, the BINGO results are displayed in the first
75 rows of the A and B columns.

Now, how do I filter the 75 results to weed out duplicates like "B12"?

(OR
another solution which may be the best is) How do I generate the 75 unique
solutions so that no duplicates appear in the first place? If anyone has

an
answer to either question, I would appreciate it very much. I tried
ADVANCED FILTER and could not get it to work and output my unique results

to
another location. Thanks.

T Harris




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T Harris
 
Posts: n/a
Default Filter unique random number

Thanks to everyone. Problem solved.


"T Harris" wrote in message
...
Using 75 cells down begining with A1 and B1, I have random number between
1-75 in B column and corresponding letters of the word BINGO to appear
accordingly in the A column. Thanks to three people in this forum, this
is working. Now when I hit F9, the BINGO results are displayed in the
first 75 rows of the A and B columns.

Now, how do I filter the 75 results to weed out duplicates like "B12"?
(OR another solution which may be the best is) How do I generate the 75
unique solutions so that no duplicates appear in the first place? If
anyone has an answer to either question, I would appreciate it very much.
I tried ADVANCED FILTER and could not get it to work and output my unique
results to another location. Thanks.

T Harris





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Filter unique random number

You're welcome, T Harris !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"T Harris" wrote in message
...
Thanks to everyone. Problem solved.



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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Delete rows based on multiple criterias Benson Excel Discussion (Misc queries) 8 November 2nd 05 03:11 PM
Match two tables using unique ID number fisherman Excel Discussion (Misc queries) 1 August 18th 05 02:36 AM
Unique Number Thomas Cox Excel Worksheet Functions 1 August 10th 05 10:21 AM
generating random number as template Jemm Excel Discussion (Misc queries) 2 July 6th 05 01:47 PM


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