+ Reply to Thread
Results 1 to 4 of 4

Sequential ID numbers generated for non-blank fields

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    Indiana
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sequential ID numbers generated for non-blank fields

    I've done a lot of looking around and found some formulas and scripts that are close to what I need, but nothing close enough that I can mold it to my needs. I have a list of points (column C) with a column on each side indicating whether the point is an input (column B) and/or an output (column D). I need something that will generate strings in columns A & E that begin with a text prefix followed by an incremented four digit sequential ID and skips blanks like the below example. Any suggestions?

    example.jpg
    Last edited by exceler_52; 12-06-2012 at 03:39 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Sequential ID numbers generated for non-blank fields

    Hi exceler,

    Try this in A2: =F(B2="","","$INPUT"&TEXT(COUNTIF($B$2:B2,"Y"),"0000"))
    and in D2: =F(D="","","$INPUT"&TEXT(COUNTIF($D2:D,"Y"),"0000"))

    Let me know if this doesn't work... or if you want to understand how it works...

    Dennis

  3. #3
    Registered User
    Join Date
    12-06-2012
    Location
    Indiana
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sequential ID numbers generated for non-blank fields

    B-E-A-UTIFUL! I was worried it was going to require a VB script. With a few minor corrections of:

    A2=IF(B2="","","$INPUT"&TEXT(COUNTIF($B$2:B2,"Y"),"0000"))
    E2=IF(D2="","","$OUTPUT"&TEXT(COUNTIF($D$2:D2,"Y"),"0000"))

    that is working exactly how I need it to. Many thanks!!!

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Sequential ID numbers generated for non-blank fields

    I'm glad you figured out that I mean IF statements... nice work... and I'm glad it worked!

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ 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