Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kevin
 
Posts: n/a
Default Exotic Bets Spreadsheet - Need Help!

Hi, I want to load the 14 horses in the Preakness into Excel. And then
have excel kick out all possible combinations for 1-2-3 place and
1-2-3-4. I can't seem to find an easy way to do this that is not
manual. Please advise - thanks! Here is the list:

1 Malibu Moonshine
2 High Fly
3 Noble Causeway
4 Greeley's Galaxy
5 Scrappy T
6 Hal's Image
7 Closing Argument
8 Galloping Grocer
9 Wilko
10 Sun King
11 High Limit
12 Afleet Alex
13 Giacomo
14 Going Wild

  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

The macro below give you all possible 1-2-3 combinations (2184 in all)
starting in D1. Assuming horse names are in A1:A14:

Sub Combos()
Dim rng As Range
Dim ws As Worksheet
Set ws = ActiveSheet
Set rng = ActiveSheet.[A1:A14]
n = 0
For i = 1 To 14
For j = 1 To 14
For k = 1 To 14
If i < j And j < k And i < k Then
n = n + 1
ws.Cells(n, "D") = "1) " & rng(i) & _
" 2) " & rng(j) & _
" 3) " & rng(k)
End If
Next k: Next j: Next i
End Sub

---
Based on a piece of code from Tom Ogilvy for creating combos.

HTH
Jason
Atlanta, GA


"Kevin" wrote:

Hi, I want to load the 14 horses in the Preakness into Excel. And then
have excel kick out all possible combinations for 1-2-3 place and
1-2-3-4. I can't seem to find an easy way to do this that is not
manual. Please advise - thanks! Here is the list:

1 Malibu Moonshine
2 High Fly
3 Noble Causeway
4 Greeley's Galaxy
5 Scrappy T
6 Hal's Image
7 Closing Argument
8 Galloping Grocer
9 Wilko
10 Sun King
11 High Limit
12 Afleet Alex
13 Giacomo
14 Going Wild


  #3   Report Post  
bj
 
Posts: n/a
Default

copy the names into columns A,B,C
copy A1:C14
and paste into A1:C196 (14 squared)
sort column B only
copy A1:C196
paste into A1:C2744 (14 cubed)
Sort Column A only
Copy A1:C2744 and paste on Sheet 2 (Will use this to generate the first
four places)
goback to sheet 1
in D1 enter
=if(or(A1=B1,A1=C1,B1=C1),1,0)
Copy D1 and paste to D1:D2744
Use filter or sort to gather all of the Column D "1" values together and
delete these rows.
Sheet one now has all of the 1,2,3 possibilities
go to sheet 2.
Copy C1:C2744 and paste to D1:D2744
copy A1:D2744 and paste to A1:D38416
Sort Column C only
in E1 enter
=if(or(A1=B1,A1=C1,A1=D1,B1=C1,B1=D1,C1=D1),1,0)
cand copy down to E38416
Again sort, or filter, to gather all of the "1"s together and delete these
rows

"Kevin" wrote:

Hi, I want to load the 14 horses in the Preakness into Excel. And then
have excel kick out all possible combinations for 1-2-3 place and
1-2-3-4. I can't seem to find an easy way to do this that is not
manual. Please advise - thanks! Here is the list:

1 Malibu Moonshine
2 High Fly
3 Noble Causeway
4 Greeley's Galaxy
5 Scrappy T
6 Hal's Image
7 Closing Argument
8 Galloping Grocer
9 Wilko
10 Sun King
11 High Limit
12 Afleet Alex
13 Giacomo
14 Going Wild


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
Scan and copy cells from one spreadsheet to another. Mark Excel Discussion (Misc queries) 1 April 6th 05 06:45 PM
Some exported records do not show on spreadsheet vulcan88 Excel Worksheet Functions 0 March 30th 05 01:11 AM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
Applying Existing Password to New Spreadsheet Vic Excel Discussion (Misc queries) 1 January 27th 05 12:37 AM
Updating 1 spreadsheet from another Sal Excel Worksheet Functions 4 December 17th 04 11:03 PM


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