Results 1 to 11 of 11

VBA to duplicate cell and continue numbering

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-05-2013
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    360

    VBA to duplicate cell and continue numbering

    Is there a code that will duplicate/insert a new row and continue the numbering system that is in column A. In the attached example I use the following code to duplicate the row that is above the cell that contains the letters "BO". In column A I have a numbering system for each row; ie SU-1, SU-2, SU-3, etc. I would like to click the button and add a new row and to contine the next number in line. So if the last row was SU-9, i would like the new row to = SU-10.

    Sub StartUp_Click()
    
    r = Columns(1).Find("BO", LookIn:=xlValues, LookAt:=xlWhole).Row
    Rows(r - 1).Copy
    Rows(r).Insert
    Application.CutCopyMode = False
    
    End Sub
    Attached Files Attached Files
    Last edited by adamheon; 10-24-2013 at 11:21 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sequence numbering for each duplicate record
    By excel.help in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2011, 05:48 PM
  2. sequential numbering duplicate data
    By mlopardo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2010, 04:11 PM
  3. sequential numbering duplicate data
    By mlopardo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2010, 03:44 PM
  4. random numbering-Why do I get duplicate numbers?
    By Gloria in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2005, 09: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