+ Reply to Thread
Results 1 to 5 of 5

Random numbers of a dice

  1. #1
    Registered User
    Join Date
    05-03-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    2

    Random numbers of a dice

    I'm working on a procedure which gives me random numbers of a dice. The code is working but I want to add some stuff, but I don't know how.

    Please Login or Register  to view this content.
    The idea is that the user can choose how many random numbers he wants to use. In this example it is 10000 numbers. I came up with this but it isn't working:

    Please Login or Register  to view this content.
    How knows how to solve this?? Thanks!!
    Last edited by davesexcel; 05-03-2010 at 06:33 AM. Reason: Code tags are required when supplying code, check out the forum rules

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Random numbers of a dice

    try

    Please Login or Register  to view this content.
    You want to concatenate the value of your variable X with the partially complete text representing the cell range. So, using a text string for the cell range, you need the concatenation operator to concatenate your variable value.

    hth

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: Random numbers of a dice

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-03-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Random numbers of a dice

    It is working although I've got another problem. The sum isn't working:

    Range("C1").Formula = "=sum("a1:a" & x)"

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Random numbers of a dice

    Hi,

    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1