Closed Thread
Results 1 to 3 of 3

Code to randomly select

  1. #1
    Registered User
    Join Date
    02-08-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Code to randomly select

    I need a code that can randomly select a set of numbers each time the macro is ran.
    I already recorded a macro but I did it to ramdon select from A-J in terms of roll and this selection should be from the already generated numbers I have in the sheet.

    This what I have recorded
    Sub copyWeigths_sheet2()
    ' copyWeigths_sheet2 Macro
    Sheets("WEIGHTS").Select
    Range("A9:J9").Select ' this could be A28 to J28
    Selection.Copy
    Sheets("Sheet2").Select
    Range("V501:AE501").Select
    ActiveSheet.Paste
    End Sub
    Thanks.
    Last edited by fo05kka; 02-09-2009 at 12:10 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Code to randomly select

    Welcome to the forum, fo05kka.

    Please take a few minutes to read the Forum Rules, and then edit your post to wrap your code with Code Tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Code to randomly select

    Thread closed.

Closed 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