+ Reply to Thread
Results 1 to 6 of 6

How to populate a range with sequential numbers?

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    How to populate a range with sequential numbers?

    Hi. It's rather simple but still. I'd like the range ("A1:J10") to be filled with numbers from 1 to 100. A1 = 1, J1 = 10, A2 = 11, till J10 gets the value 100. I've tries NESTED FOR-NEXT LOOP that may be a start for an answer, but I need assistance here.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How to populate a range with sequential numbers?

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: How to populate a range with sequential numbers?

    Try this:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to populate a range with sequential numbers?

    Thank you guyz . Follow-up question - when there is a nested FOR-NEXT loop, what loop is being executed first?

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How to populate a range with sequential numbers?

    From millz solution:

    When i =1
    then j will loop from 1 to 10
    after that i=2
    then j again loop from 1 to 10
    etc.

  6. #6
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to populate a range with sequential numbers?

    Cheers zbor

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 01-11-2013, 11:56 AM
  2. [SOLVED] Put Sequential Numbers in a Range
    By JohnM3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2012, 02:32 PM
  3. [SOLVED] Populate sequential number based on selection
    By DeannaV in forum Excel General
    Replies: 3
    Last Post: 05-18-2012, 12:08 PM
  4. Replies: 3
    Last Post: 03-05-2012, 12:11 AM
  5. Replies: 1
    Last Post: 04-28-2006, 02:20 PM

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