NUMBER GENERATOR HELP NEEDED

Hi, I'm looking for a letters generator from a to g. Or a numbers generator. 1 to 9. I have a scoring system for a horseshoe game I created in excel 2007 beta. I need the letters in column d3 to d13 to update once a round is completed. Which happens ok. But once a team is eliminated. I dont want a letter assined to the cell. If anyone could take a look will understand my issue.

I will email you the workbook if you think you can help me out with this. I don't no vba yet but am trying to understand it. my email is trobert672@comcast.net



Answer this question

NUMBER GENERATOR HELP NEEDED

  • JayR

    Hi,

    To produce random integers in a given range, use this formula:

    Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
     
        Dim upperbound As Integer
    upperbound = 9
    Dim lowerbound As Integer
    lowerbound = 1

    Dim random As Integer
    random = Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
        MsgBox random
     


  • SnakeSV

    How do you plan to map a set of nine integers to a set of seven letters



  • programmer01

    Hi Derek, I try it out but I dont no what i'm really doing. I could send you the file to look at if needed Thanks again for your response Tom
  • FQ

    I'm sorry mate I don't have any time at the moment to look at the file.

    You know what needs to be done so thats a start. Store your letters in an array and use the random number to index an element in the array. Thats pretty straight forward. Have a look at arrays in the help. Post again if you get stuck and someone will help you out.



  • NUMBER GENERATOR HELP NEEDED