+ Reply to Thread
Results 1 to 3 of 3

VBA - Insert next sequential number from series in a column

  1. #1
    Registered User
    Join Date
    01-25-2015
    Location
    Minneapolis, MN
    MS-Off Ver
    Windows 7
    Posts
    36

    VBA - Insert next sequential number from series in a column

    Hello. Looking to have VBA that will insert the next sequential number. I have 500 rows of data starting in row 4; column B has 'ID' numbers - say, 1-500. I would like to be able to insert a row anywhere within the range and upon macro execution, the active row - column B, the next available number populates. So if 1-500 are used, 501 would be next up. If however the sequence had a gap, for example, 297, 298, 300, 301, 302........<299> would populate in the active row - column B.

    Any help would be appreciated.

    Thanks,
    Ryan

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA - Insert next sequential number from series in a column

    First, you must insert the blank rows manually, then run this sub :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: VBA - Insert next sequential number from series in a column

    You may try something like this...

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. [SOLVED] Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA
    By CC268 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2017, 01:09 PM
  2. Sequential series of letters with a number
    By Stephenwww in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-16-2016, 02:04 PM
  3. Macro to insert sequential reference number into subject of email...
    By lamensterms in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2014, 02:04 AM
  4. Replies: 10
    Last Post: 10-30-2013, 07:29 PM
  5. [SOLVED] Insert Column when a sequential isn't found
    By reggie1000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2013, 11:28 AM
  6. VBA-Insert rows and fill number series
    By stern.ed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2010, 09:14 AM
  7. Replies: 2
    Last Post: 08-04-2005, 06:05 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