![]() |
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 |
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 |
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 |
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 _ _ ^вп^ -- |
All times are GMT +1. The time now is 05:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com