Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display text at random | Excel Discussion (Misc queries) | |||
random number with text | Excel Worksheet Functions | |||
random text | Excel Programming | |||
Random Text | Excel Programming | |||
matching random text | Excel Programming |