+ Reply to Thread
Results 1 to 3 of 3

Macro request for sequential numbering

  1. #1
    Registered User
    Join Date
    10-05-2011
    Location
    NYC
    MS-Off Ver
    Excel 2010 Professional Plus
    Posts
    44

    Macro request for sequential numbering

    Hello,

    I currently have a macro that copies a set of data on Sheet1, range A1:F300, pastes this data onto Sheet2 and then deletes certain rows based on criteria I have established. This 300 rows of data is whittled down to, for example, ten rows. Previously, the 300 rows were labeled "1", "2"... "300" in column D. Now on Sheet2 I have "27", "43", "66" etc. in column D, but only ten rows.

    I would like my macro to be able to renumber each of those values within column D to a sequential number of "1", "2", "3"... "10" based upon the total number of rows with data on Sheet2. If there are five rows it should number them 1 through 5. If there are 200 rows it should number them 1 through 200.

    Thank you in advance!

    Bjordion

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Macro request for sequential numbering

    This code should be added after your paste routine. Note that it assumes your data begins at A1 and is a continuous block of cells and that you want your numbering to appear in the D column.
    Please Login or Register  to view this content.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro request for sequential numbering

    hi Bjordion, option. If data for sequential numbering starts from F4 and numbers should appear from E4 and down

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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