+ Reply to Thread
Results 1 to 4 of 4

Column sequence autofil?

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Santa Ana, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Column sequence autofil?

    Hello, all. I was wondering how I could automatically enter a value next in a sequence in a cell when an adjacent cell has data in it and continue doing so indefinitely (or until the 65536th row). I could do this with autofil, but The sequence starts in the middle of the worksheet (there is a title and document data in the top few rows). The layout is as follows:

    Cell A17 has "Part 1" in it (and always will before the form gets filled out), and all cells in colum A beneath that will be blank. Column B is where the user enters a dimension. So, at the start, entering a value into cell B17 won't do anything. However, if they enter a value into cell B18, I would like cell A18 to automatically be filled with the next part number in the sequence (in this case, "Part 2" in cell A18). The user will never skip rows when they enter data so the sequence will always be +1 to the previous cell in the column.

    I'm doing this so they can just print out the completed sheet and not have to edit out the empty "Part *" cells that have no corrosponding dimensions.

    Is there a simple way to tailor autofill to do this or would I need a macro?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Column sequence autofil?

    not sure what your sequence is, but try something like this...

    =if(cell-next-door="","",cell-above+1)

    this can be copied down as far as you need it, and will only show anything if the cell next to it has something in it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Column sequence autofil?

    Put this in A18:

    =IF(B18="","","Part "&(RIGHT(A17,LEN(A17)-5)+1))

    then copy this down as far as you need to - it will show blank until something is put into column B for each row.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    Santa Ana, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Column sequence autofil?

    Quote Originally Posted by Pete_UK View Post
    Put this in A18:

    =IF(B18="","","Part "&(RIGHT(A17,LEN(A17)-5)+1))

    then copy this down as far as you need to - it will show blank until something is put into column B for each row.

    Hope this helps.

    Pete
    Worked like a champ! Very much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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