+ Reply to Thread
Results 1 to 2 of 2

=rand() command

  1. #1
    Andrea
    Guest

    =rand() command

    I have many columns of data for which I need to get random numbers, then
    lock them in with the edit, paste special/value commands before sorting. Is
    there any way to do this except column by column? It gets the job done, but
    it's very tedious and time-consuming? Thanks.



  2. #2
    PeterAtherton
    Guest

    RE: =rand() command

    You could use a macro such as:

    This fills in decimals
    Sub FillRndNos()
    Dim c
    For Each c In Selection
    c.Value = Rnd()
    Next
    End Sub

    This fills in Integers between 1 & 24

    Sub Fill2()
    For Each c In Selection
    c.Value = CInt(Rnd() * 24 + 1)
    Next
    End Sub

    Regards
    Peter


    "Andrea" wrote:

    > I have many columns of data for which I need to get random numbers, then
    > lock them in with the edit, paste special/value commands before sorting. Is
    > there any way to do this except column by column? It gets the job done, but
    > it's very tedious and time-consuming? Thanks.
    >
    >
    >


+ 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