Results 1 to 11 of 11

Generate random sequence of numbers in excel

Threaded View

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Canada, Toronto
    MS-Off Ver
    Excel 2003
    Posts
    9

    Generate random sequence of numbers in excel

    Hi everyone !

    Can someody help me generate a sequence of numbers like
    0
    1
    2 2
    3 3 3
    4 4 4 4
    till 200

    in excel with the help of a macro ??
    My code is like this :

    Sub Generate_Numbers()
    
     Dim CountRow As Long
     Dim cLastRow As Long
     Dim i As Double
    
     For CountRow = 1 To 201
     Worksheets("random numbers").Cells(CountRow, 1).Value = i
     i = i + 1
     Next CountRow
    
    End Sub
    Thank you !
    Last edited by excelvb; 04-06-2011 at 06:20 AM.

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