Slumpgenerator i Excel

Hej hoppas att det ör några här
Jag undrar om det går att göra en typ harryboy generator allså jag Å
SPelar för 600kr då får jag en slump av rader för 7 lopp för 600 kr

Ja, men det vore nog enklare att göra i Python eller liknande.

RAND function - Microsoft Support.

Du behöver logik som exkluderar hästar som inte är spelbara, vilket blir knepigare än slump-funktionen.

Fråga ChatGPT

Är du duktig med pyhton och kan gör något ex

Nu vill jag i första skedet att om jagspelar för 600 då vill jGg slumpa rader för 600kr

Som sagts ovan, chatgpt etc ger dig en väg framåt

I want to create random bets in horse races using excel. Let’s say there are 7 races, and in each race there is a list of horses which can be played. For instance, in race 1, you can bet on horses 1,2,3,7,8,13, while in the second race you can bet on 1,2,3,4,5,10,11,12 etc. How can I generate these bets randomly. I want to create N different bets on the 7 races

ChatGPT

To create random bets for horse races in Excel, you can use a combination of Excel functions and a structured approach. Here’s a step-by-step guide to help you generate random bets:

  1. List Horses for Each Race: First, you need to create a list of available horses for each race. This will be used as the pool from which random selections are made.
  2. Generate Random Bets: Use the RAND and INDEX functions to select random horses for each race. You can also use RANDBETWEEN if you want to specify a specific range of horse numbers.
  3. Repeat for N Bets: Create a loop or use Excel’s drag-and-copy feature to generate multiple rows of random selections.

Here’s an example setup:

Step 1: List Horses for Each Race

Create a table with the list of horses for each race. For example:

Race Available Horses
1 1, 2, 3, 7, 8, 13
2 1, 2, 3, 4, 5, 10, 11, 12
3
7

You can list the horses in separate cells or as a comma-separated string. For simplicity, let’s assume they are listed in separate columns:

A B C D E F G H
1 Race 1 1 2 3 7 8 13
2 Race 2 1 2 3 4 5 10 11 12

Step 2: Generate Random Bets

For each race, use a formula to pick a random horse. For instance, to pick a random horse for Race 1, you can use the following formula in a new cell:

excel

Kopiera kod

=INDEX(B1:H1, RANDBETWEEN(2, COUNT(B1:H1)))

This formula randomly selects one of the horses listed for Race 1. You can repeat this for each race, adjusting the ranges accordingly.

Step 3: Repeat for N Bets

To create multiple bets, you can drag the formula down to create as many rows as you need. For example, if you want to create 10 bets, drag the formulas down from row 2 to row 11 (assuming row 1 contains headers).

Example Output

Bet # Race 1 Race 2 Race 3 Race 7
1 1 3 11
2 2 8 5

Notes

  • Recalculation: Excel’s random functions recalculate every time the sheet changes. To prevent this, you can copy the generated bets and paste them as values.
  • Adjusting Number of Horses: Ensure that the ranges (e.g., B1:H1) are correctly set according to the number of horses in each race.

By following these steps, you can easily generate a list of random bets for multiple races in Excel.

1 gillning

För att styra upp grundfrågan lite. Harry Boy är ingen slumpgenerator. Den bygger sina system utifrån hur övriga spelar lagt sina spel.

Jag kommer inte göra det åt dig.
Du har fått ett bra underlag från chatgpt och CarlJohan, tillvägagångssättet är ungefär samma oavsett vilket språk du använder, lite olika syntax bara.

Googla också, det finns garanterat oändligt med exempel på slumpgenering som du kan anpassa för ditt behov.