+ Reply to Thread
Results 1 to 10 of 10

Would like help on how to create a sequence in this format

  1. #1
    Registered User
    Join Date
    04-16-2024
    Location
    Los Angeles
    MS-Off Ver
    XLS
    Posts
    4

    Would like help on how to create a sequence in this format

    Hello,

    Would like help on how to create a sequence in this format:

    01-01-A-01
    01-01-B-01
    01-01-C-01
    01-01-D-01
    01-01-E-01

    I need these to repeat 5 times (rows) where the 3rd value after the dash is A, B, C, D, E. Then Repeat again but this time the 2nd Value update to 02. Need this 18 times where the final set is :

    01-18-A-01
    01-18-B-01
    01-18-C-01
    01-18-D-01
    01-18-E-01

    I then need to do the same sequence but change the value in the first value to 02 (02-01-A-01) etc, etc.

    Thank you in advance for any guidance

    Samples Locations.xlsxSamples Locations.xlsx

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

    Re: Would like help on how to create a sequence in this format

    Do you want this in just one column, or in 4 (narrow) columns each containing a separate element?

    Pete

  3. #3
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Would like help on how to create a sequence in this format

    Here is a snippet I use in these cases; it's a little verbose but it's ready for many combinations and as it is it starts from cell A1:
    Please Login or Register  to view this content.
    Ps. Hi to all.
    Last edited by rollis13; 04-16-2024 at 06:46 PM.
    Difficult is not to know but to share what you know (Han Fei Tzu reworked)

  4. #4
    Registered User
    Join Date
    04-16-2024
    Location
    Los Angeles
    MS-Off Ver
    XLS
    Posts
    4

    Re: Would like help on how to create a sequence in this format

    One column

  5. #5
    Registered User
    Join Date
    04-16-2024
    Location
    Los Angeles
    MS-Off Ver
    XLS
    Posts
    4

    Re: Would like help on how to create a sequence in this format

    Quote Originally Posted by Pete_UK View Post
    Do you want this in just one column, or in 4 (narrow) columns each containing a separate element?

    Pete
    One column

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

    Re: Would like help on how to create a sequence in this format

    Okay, put this in your starting cell (A1 ?):

    =TEXT(INT((ROWS($1:1)-1)/5/18)+1,"00-")&TEXT(MOD(INT((ROWS($1:1)-1)/5),18)+1,"00-")&CHAR(64+MOD(ROWS($1:1)-1,5)+1)&"-01"

    then copy down as far as you need to.

    Hope this helps.

    Pete

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: Would like help on how to create a sequence in this format

    "A","B",... could be any random string,change it inside the CHOOSE function

    Please Login or Register  to view this content.
    Quang PT

  8. #8
    Registered User
    Join Date
    04-16-2024
    Location
    Los Angeles
    MS-Off Ver
    XLS
    Posts
    4

    Re: Would like help on how to create a sequence in this format

    Quote Originally Posted by Pete_UK View Post
    Okay, put this in your starting cell (A1 ?):

    =TEXT(INT((ROWS($1:1)-1)/5/18)+1,"00-")&TEXT(MOD(INT((ROWS($1:1)-1)/5),18)+1,"00-")&CHAR(64+MOD(ROWS($1:1)-1,5)+1)&"-01"

    then copy down as far as you need to.

    Hope this helps.

    Pete

    This worked perfectly Pete!! Thank you so much!

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

    Re: Would like help on how to create a sequence in this format

    You're welcome, and thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Pete

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

    Re: Would like help on how to create a sequence in this format

    Administrative Note:

    Welcome to the forum.

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] Create logic horizontal sequence
    By ionelz in forum Excel General
    Replies: 5
    Last Post: 01-29-2020, 02:22 PM
  2. [SOLVED] Code to create numbers in sequence
    By GKT in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-16-2014, 07:24 AM
  3. Trying to create an Order # sequence
    By nyrob609 in forum Excel General
    Replies: 1
    Last Post: 09-13-2011, 05:20 PM
  4. Create an alphanumeric sequence
    By footsoreaxe in forum Excel General
    Replies: 11
    Last Post: 11-25-2009, 02:51 PM
  5. Create a conditional sequence????
    By zav13r in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-26-2007, 07:55 AM
  6. Replies: 6
    Last Post: 08-02-2006, 11:40 AM
  7. Create a numerical sequence in a column: From 1 to ....
    By Depechez in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-18-2006, 12:50 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