MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 07:23 PM   #1
Tonester101
 
Join Date: Nov 2003
Location: Birmingham, England
Posts: 6
Default Random sorting

Hi all

I have tried searches hear for my following problem but with no joy.

I am creating a competition for Euro 2004 (a major european soccer tournament for those that don't know). There are 4 groups with 4 teams in each group. Each player will get 1 team from each group. I have typed out all the combinations (all 256 of them!!). Down a column I have wrote numbers 1 to 256. Can I sort the column of numbers into a random order? These will then link to all combinations. I have absolutely no knowledge of VB and need someones help so I don't have to go to a random cell in the column and type each number. I hope this makes sense.

Thanks to anyone that can help

Cheers

Tonester
Tonester101 is offline   Reply With Quote
Old Mar 30th, 2004, 07:42 PM   #2
DRJ
MrExcel MVP
 
DRJ's Avatar
 
Join Date: Feb 2002
Location: California
Posts: 3,857
Default

Instead of typing 1-256 put this in the first cell

=rand()

Fill down for all the rows

Now sort my that column

After sorting re-number 1-256
__________________
Excel VBA Training and Certification (Lesson 1 is free)
<hr>

<hr>-Jacob
DRJ is offline   Reply With Quote
Old Mar 30th, 2004, 07:43 PM   #3
kkknie
 
Join Date: Apr 2002
Location: Greenwood, SC
Posts: 677
Default Re: Random sorting

Change the numbers 1-256 to =RAND(). Hit F9 a couple of times then select all the column and choose Copy then Paste Special and select Values. Then sort on the column with the random numbers.

K

Edit: Dang Jacob is fast...
kkknie is offline   Reply With Quote
Old Mar 30th, 2004, 08:42 PM   #4
Tonester101
 
Join Date: Nov 2003
Location: Birmingham, England
Posts: 6
Default Re: Random sorting

Thank you both. I tried the first and it worked but offer many thanks to both replies. It has saved so much time.

Cheers

Tonester
Tonester101 is offline   Reply With Quote
Old Mar 31st, 2004, 02:32 AM   #5
DRJ
MrExcel MVP
 
DRJ's Avatar
 
Join Date: Feb 2002
Location: California
Posts: 3,857
Default

Glad to help

Take Care
__________________
Excel VBA Training and Certification (Lesson 1 is free)
<hr>

<hr>-Jacob
DRJ is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.