+ Reply to Thread
Results 1 to 10 of 10

[SOLVED] Using a Sequence that Restarts N times and SPILLS

  1. #1
    Registered User
    Join Date
    02-05-2023
    Location
    Montreal
    MS-Off Ver
    2022
    Posts
    3

    [SOLVED] Using a Sequence that Restarts N times and SPILLS

    I want to Have a Sequence that starts at

    10003057 and ends at 10003143

    Once the sequence gets to 10003143, I want it to restart back to 10003057.

    So I want this to happen N times (it'll change each week so I'll just use a reference a cell). For the sake of this question, we will say N = 3 times

    So to be clear, I want it to go from 10003057-10003143 and repeat it 3 times.

    What I need help with, is having a formula that will do what I mentioned above and SPILL the result (similar to the Sequence function).

    I have a achieved this with an IF formula but this does not SPILL and I am trying to avoid dragging down the formula.
    Attached Files Attached Files
    Last edited by dyl019; 02-06-2023 at 06:36 PM.

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2505 and WPS V2024(12.1.0.18543)
    Posts
    4,113

    Re: Using a Sequence that Restarts N times and SPILLS

    Cell A4 formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-02-2020
    Location
    Turkey
    MS-Off Ver
    365 TR - V.2309
    Posts
    97

    Re: Using a Sequence that Restarts N times and SPILLS

    Hi,

    another option

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by 52779; 02-06-2023 at 07:32 AM.

  4. #4
    Registered User
    Join Date
    02-05-2023
    Location
    Montreal
    MS-Off Ver
    2022
    Posts
    3

    Re: Using a Sequence that Restarts N times and SPILLS

    Thanks Guys the formulas worked. I ended up using the
    =LET(a,SEQUENCE(C3-C2+1,,C2),TOCOL(IFERROR(EXPAND(a,,C4),a),,1)).

    I have one last question, its pertaining to the same idea.

    This time, I need it to repeat the #1 87 times (this too will change, but i'll denote N=87), than the #2 87 times, than the #3 87 Times .... So and so forth.
    I'll denote this repetition factor by R=19 (this will also change week to week). I have a formula that does this as well but I want it to SPILL like in the formula you provided!

    You guys have a been a great Help.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Using a Sequence that Restarts N times and SPILLS

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,939

    Re: Using a Sequence that Restarts N times and SPILLS

    If you have the functions,
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Put the repeat value in A1 and the value to be repeated in A2 (single digits only)
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,939

    Re: Using a Sequence that Restarts N times and SPILLS

    This will work for any number of characters to be repeated:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-05-2023
    Location
    Montreal
    MS-Off Ver
    2022
    Posts
    3

    Re: Using a Sequence that Restarts N times and SPILLS

    perfect thank you, worked like a charm!

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,939

    Re: [SOLVED] Using a Sequence that Restarts N times and SPILLS

    You're welcome.



    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  10. #10
    Registered User
    Join Date
    06-02-2020
    Location
    Turkey
    MS-Off Ver
    365 TR - V.2309
    Posts
    97

    Re: Using a Sequence that Restarts N times and SPILLS

    Quote Originally Posted by dyl019 View Post
    Thanks Guys the formulas worked. I ended up using the
    =LET(a,SEQUENCE(C3-C2+1,,C2),TOCOL(IFERROR(EXPAND(a,,C4),a),,1)).

    I have one last question, its pertaining to the same idea.

    This time, I need it to repeat the #1 87 times (this too will change, but i'll denote N=87), than the #2 87 times, than the #3 87 Times .... So and so forth.
    I'll denote this repetition factor by R=19 (this will also change week to week). I have a formula that does this as well but I want it to SPILL like in the formula you provided!

    You guys have a been a great Help.
    Hi,

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by 52779; 02-06-2023 at 08:27 PM.

+ 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. Replies: 4
    Last Post: 01-04-2022, 03:58 AM
  2. [SOLVED] sequence of date and numbers and times.
    By hopeful_positive in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2018, 04:27 AM
  3. [SOLVED] Count how many times letter doesn't appear in sequence?
    By Blue11440 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-25-2018, 06:59 PM
  4. Replies: 7
    Last Post: 10-24-2017, 06:00 PM
  5. How do i count the number of times a sequence appears in a row of data
    By dony85 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2014, 01:57 PM
  6. Replies: 10
    Last Post: 07-18-2014, 06:11 AM
  7. Replies: 2
    Last Post: 10-11-2012, 02:54 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