+ Reply to Thread
Results 1 to 3 of 3

VBA code for sequential numbers for a column containing letters and numbers

  1. #1
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    VBA code for sequential numbers for a column containing letters and numbers

    I have a column with letters and numbers. ex: REJ0001, REJ0002, REJ0003...REJ10935. The next line needs to be REJ10936. I would like to have VBA code to look at the range in (Table1) column (REJECT NO.) and determine the highest value and then add one to it. This should be done when USERFORM1 is opened.

    I can then insert the new number into a new row with all other fields in USERFORM1.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: VBA code for sequential numbers for a column containing letters and numbers

    In this example the Reject No. Field is in Column G. Change yours to what ever it is in your spreadsheet. You can put this in a Open form Event. Since I don't have your file and form, I was unable to test on your file.

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    08-10-2016
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Office 365
    Posts
    124

    Re: VBA code for sequential numbers for a column containing letters and numbers

    Thank you!

+ 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. Generate sequential letters and numbers populated on textbox (userform)
    By stewart1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2015, 03:40 PM
  2. [SOLVED] code for copying sequential numbers
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2015, 08:53 PM
  3. Replies: 1
    Last Post: 08-27-2014, 11:05 AM
  4. [SOLVED] Making a Part# List, Sequential Increments with Letters and numbers in front...
    By kpl39 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-31-2012, 08:29 PM
  5. Replies: 4
    Last Post: 07-29-2012, 08:40 AM
  6. Replies: 4
    Last Post: 02-04-2012, 01:46 PM
  7. Sequential column numbers
    By C Holmes in forum Excel General
    Replies: 2
    Last Post: 06-04-2010, 01:45 PM

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