+ Reply to Thread
Results 1 to 7 of 7

Prefixed Numerical List

  1. #1
    Registered User
    Join Date
    11-02-2016
    Location
    Wichita, Kansas
    MS-Off Ver
    Office 365
    Posts
    3

    Prefixed Numerical List

    Is there a way to give a number a prefix making it a unique number?

    Here is the problem I have.
    I need a number that will range from 0001-9999 in about 20 different groups with various prefix's like A1, A2, B1, B2.... etc. With the overall goal is having that I need to be able to have A1-0001, A1-0002, as well having a B1-0001, and B1-0002.

    It will be on one sheet that we will need to be able to fill in the group and the number and not be able to use a number that has already been used under that group.

    Hopefully there is an answer better than just making a sheet for each group and having to manually do everything there.

    Any help would be appreciated,

    Thanks!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Prefixed Numerical List

    You can use:

    =IFERROR(INDEX($Q$2:$Q$5,1+INT((ROWS(A$2:A2)-1)/99))&TEXT(1+MOD((ROWS(A$2:A2)-1),99),"00"),"")


    for simplicity (and checking) I went to 99. Change the bits in RED to suit your needs.

    The bit in Cyan... 00 for 99, 000 for 999, 0000 for 9999
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    11-02-2016
    Location
    Wichita, Kansas
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Prefixed Numerical List

    Glenn, Thanks for this answer. I suppose I should have given a bit more information on the problem. The prefix part will be a selection from the user of the excel and the number that will follow will be a automatically filled in with the next number in the sequence. I could run into a situation where the I could have A1, A2, B1, A3, B2....etc. If I am reading and understanding the formula correctly, it would not be able to account for the order issues.

    Thanks again for the help!

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Prefixed Numerical List

    I think this might be what you are looking for. Unfortunately it utilizes the SEQUENCE() function, so i am hoping you forgot to update your MS office version on your profile. This will only work for MS office 365.
    In column A the person enters A1 or A2 or B1 or D55 ...etc etc.
    In B1 use this array function. Make sure to enter with CTRL + SHIFT + ENTER so that the formula does not SPILL. If done so correctly { } will be added around your formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Prefixed Numerical List

    Sorry, I have no idea what you want. Unless you can SHOW me on a sample Excel sheet, I'll step aside at this point.

  6. #6
    Registered User
    Join Date
    11-02-2016
    Location
    Wichita, Kansas
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Prefixed Numerical List

    The formula dosydos provided will work for what I was needing. I did provide an excel showing a little bit more as to what I would need. The issue could be that the amount of fields I will need to have available in column A will be close to 100 items. They would each have needed their own numbers pool to pull from. Lets say as if column A was departments and column B was projects in that department. It does look like I will be able to tweak the provided formulas and get it from there. You both have been very helpful.

    Thanks,
    Attached Files Attached Files
    Last edited by Kimpten; 06-27-2022 at 05:36 PM.

  7. #7
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Prefixed Numerical List

    Glad it worked and thanks for the rep!

+ 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. List identifiers with only a numerical value
    By TRAPLETT in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-30-2017, 05:23 AM
  2. non numerical list comparison
    By cheesemeister in forum Excel General
    Replies: 11
    Last Post: 10-14-2015, 03:43 PM
  3. Copy prefixed names to there own sheets
    By boltonlad2k in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2015, 02:49 PM
  4. [SOLVED] List all prefixed numbers from a range
    By searstream in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2012, 01:01 PM
  5. How to have txt prefixed into a cell?
    By jediknight in forum Excel General
    Replies: 4
    Last Post: 08-14-2010, 02:14 PM
  6. how do I add values prefixed with a letter
    By Davycc in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-08-2008, 02:28 PM
  7. Incrementing a number as string prefixed with zero's
    By bluepill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2007, 06:58 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