+ Reply to Thread
Results 1 to 5 of 5

Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

  1. #1
    Registered User
    Join Date
    03-01-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Question Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

    This should be fairly straight forward, but I am having a tough time getting it figured out. I simply want to insert a blank Column A and then fill in Column A with a series of sequential numbers all the way down until the last value in Column B.

    Here is what I have so far...

    Please Login or Register  to view this content.
    See example spreadsheet for clarification. Notice cell B2 will always be blank so we need to make sure we are using the .End(xlUp).Row function to make sure the code isn't stopping at cell B2 and is capturing the entire range of Column B.
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

    To summarize... you currently have a column A in the original with the NHA Part number... you want to insert a new column A and then simply put numbers in A starting at 1, and going down to the last cell with data in Col B?

    Give this a shot:

    Please Login or Register  to view this content.
    Note that using .Select and Selection, are usually not the best method. Whenever possible work with ranges directly.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    03-01-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    MS Office 2013
    Posts
    94

    Re: Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

    Beautiful! Worked great! Thanks a lot!

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

    Happy to help! The rep, and marking the thread as solved are much appreciated

  5. #5
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Re: Fill Series of Sequential Numbers in Column A Based on Last Value in Column B - VBA

    Hi cc268

    this will insert a '1' into cell A3, next to your PartNumber1 then copy down sequentially to the last entry in colum B

    hope this is what you are looking for

    Please Login or Register  to view this content.

+ 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. Adding sequential numbers to Column A if Column B has text
    By computer12345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-28-2015, 09:11 AM
  2. Copy row n times based on cell value in row, add new column will fill series
    By Imagination in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2015, 10:23 PM
  3. Adding Sequential Numbers in Column B Based on Column A Values
    By habsfan1433 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-14-2014, 04:17 PM
  4. [SOLVED] Create sequential numbers in a column
    By mrjinx007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 01:37 PM
  5. [SOLVED] How to use auto-fill to have a sequential series of quarters?
    By GIS2013 in forum Excel General
    Replies: 7
    Last Post: 07-18-2013, 04:07 AM
  6. Sequential column numbers
    By C Holmes in forum Excel General
    Replies: 2
    Last Post: 06-04-2010, 01:45 PM
  7. [SOLVED] Fill a column with sequential numbers
    By GISDude in forum Excel General
    Replies: 4
    Last Post: 05-01-2006, 09:45 AM

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