#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default random text

here goes
randomize either name to team or team to name
list of football teams 40
list of names 40
command button 1
press command button so that a name will match up to a team , but never
duplicate until reset, use the a1:a40 cells and b1:b40 cells

hope i have made it clear for all you people
good luck and many thanks

example

A B
1 bob billingham
2 dave hartlepool
3 john redcar

after click on command button to randomize team or name

A B
1 bob hartlepool
2 dave redcar
3 john billingham

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default random text

Sub CommandButton1_Click()
range("C1:C40").Formula = "=rand()"
Range("B1:C40").Sort Key1:=Range("C1")
Range("C1:C40").ClearContents
End Sub

--
Regards,
Tom Ogilvy


"mickytech" wrote in message
...
here goes
randomize either name to team or team to name
list of football teams 40
list of names 40
command button 1
press command button so that a name will match up to a team , but never
duplicate until reset, use the a1:a40 cells and b1:b40 cells

hope i have made it clear for all you people
good luck and many thanks

example

A B
1 bob billingham
2 dave hartlepool
3 john redcar

after click on command button to randomize team or name

A B
1 bob hartlepool
2 dave redcar
3 john billingham



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default random text

micky

Check out John McGimpsey's site for methods of randomizing lists.

http://www.mcgimpsey.com/excel/udfs/randint.html

Gord Dibben Excel MVP

On Sun, 8 Aug 2004 11:11:02 -0700, mickytech
wrote:

here goes
randomize either name to team or team to name
list of football teams 40
list of names 40
command button 1
press command button so that a name will match up to a team , but never
duplicate until reset, use the a1:a40 cells and b1:b40 cells

hope i have made it clear for all you people
good luck and many thanks

example

A B
1 bob billingham
2 dave hartlepool
3 john redcar

after click on command button to randomize team or name

A B
1 bob hartlepool
2 dave redcar
3 john billingham


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default random text

Hi,

-------------------------------------------------
Sub TEST_1()
With Range("C1:C40")
.Formula = "=RAND()"
Range("B1:C40").Sort Key1:=.Cells(1)
.ClearContents
End With
End Sub
-------------------------------------------------

-------------------------------------------------
Sub TEST_2()
With Range("B1:C40")
.Columns(2).Formula = "=RAND()"
.Sort Key1:=.Cells(1, 2)
.Columns(2).ClearContents
End With
End Sub
-------------------------------------------------


--
Regards,
Soo Cheon Jheong
_ _
^ąŻ^
--


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
Display text at random Markv Excel Discussion (Misc queries) 2 July 25th 08 09:08 AM
random number with text T Harris Excel Worksheet Functions 10 December 30th 05 04:34 PM
random text mickytech Excel Programming 0 August 8th 04 06:43 PM
Random Text Pete Excel Programming 1 February 4th 04 09:20 PM
matching random text Lance\\Sheri Excel Programming 1 October 7th 03 07:03 AM


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"