+ Reply to Thread
Results 1 to 11 of 11

Auto Numbering based on another reference number

  1. #1
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Auto Numbering based on another reference number

    Hi Gurus,

    I'm enhancing my tracker and would like to seek your help on getting unique reference ids.
    I have 3 conditions on how a unique reference id will be entered on Column A. Auto numbering will be based on the Project Number.
    If the the project numbers are the same, the only sequence that will change will be the last 2 digits.
    If the project number are totally different from the previous rows, the 4 digits & 2 digits will change.
    If the project number are blank, the 4 digits & 2 digits will change.

    Please see sample below. This is how I picture it. I just want it automated.
    Also, it will be nice if I only get a solution that requires simple formula.



    Thanks
    Last edited by EXCELBENCH; 08-08-2019 at 09:32 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Auto Numbering based on another reference number

    Here you go:

    ="S-ITS19-"&TEXT(SUMPRODUCT(1/COUNTIF($B$2:$B2,$B$2:$B2&"")),"0000")&"-"&TEXT(COUNTIF(B$2:B2,B2),"00")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Auto Numbering based on another reference number

    That was fast thank you Ma'am!
    Last edited by AliGW; 08-08-2019 at 05:00 AM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Auto Numbering based on another reference number

    No worries. It was easy!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  5. #5
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Auto Numbering based on another reference number

    Got it on the Admin note.

    I tried it on the actual file and I see some problem.
    Like if the Project number repeats on the latter part of the spreadsheet.
    It doesn't give the right reference id instead it will make a new one.
    Last edited by EXCELBENCH; 08-08-2019 at 09:32 PM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Auto Numbering based on another reference number

    Attach the workbook. I think you have not copied the formula correctly.

  7. #7
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Auto Numbering based on another reference number

    Here you go
    Last edited by EXCELBENCH; 08-08-2019 at 09:33 PM.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Auto Numbering based on another reference number

    Try this:

    ="S-ITS19-"&IF(ISNA(MATCH(B2,B$1:B1,0)),TEXT(SUMPRODUCT(1/COUNTIF($B$2:$B2,$B$2:$B2&"")),"0000"),MID(INDEX(A$1:A1,MATCH(B2,B$1:B1,0)),9,4))&"-"&TEXT(COUNTIF(B$2:B2,B2),"00")

  9. #9
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Auto Numbering based on another reference number

    Works perfectly. Thank you so much!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Auto Numbering based on another reference number

    Why have you removed the images and sample workbook from this thread? Please put them back. This thread should remain completely intact so that it can be of help to members in the future. Please do not vandalise your threads in this way, as it renders them useless.

  11. #11
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Auto Numbering based on another reference number

    Image for sample testing
    Attached Images Attached Images

+ 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. [SOLVED] Formula to auto-generate next sequential number dependent on document numbering
    By tpharand in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-17-2018, 01:15 PM
  2. Multi level reference id - auto numbering - similar to legal numbering
    By smsko in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-11-2017, 06:05 AM
  3. [SOLVED] Auto sequential numbering based on a cell text
    By GAG24 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2017, 07:34 AM
  4. Replies: 8
    Last Post: 05-30-2017, 11:39 AM
  5. Auto numbering based on cell reference value
    By miteshan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2014, 01:58 AM
  6. Replies: 5
    Last Post: 05-03-2012, 09:49 AM
  7. [SOLVED] Auto numbering in VBA based on the max number in a column.
    By muddbog in forum Excel General
    Replies: 8
    Last Post: 04-01-2012, 01:58 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