+ Reply to Thread
Results 1 to 23 of 23

Repeating sequence, how?

  1. #1
    Registered User
    Join Date
    06-14-2015
    Location
    netherlands
    MS-Off Ver
    2000
    Posts
    10

    Repeating sequence, how?

    please help

    D1: =Blad2!B2
    D2: =Blad2!D2
    D3: =Blad2!F2

    I want to repeat this sequence as following
    D4: =Blad2!B3
    D5: =Blad2!D3
    D6: =Blad2!F3

    D7: =Blad2!B4
    D8: =Blad2!D4
    D9: =Blad2!F4

    How do i do this
    Attached Files Attached Files

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Repeating sequence, how?

    Well, if you just slightly modified your current sheet (Blad1) to include the ID on all three lines as in my example workbook (attached), you could simply use this INDEX formula in cell D1, then fill it down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Moo
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Repeating sequence, how?

    =OFFSET(Blad2!$B$1,TRUNC(ROW(A3)/3),MOD(ROW(A3),3)) in cell D1 and copy down

    Regards

    Dav

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

    Re: Repeating sequence, how?

    You can use this in D1 of Blad1:

    =INDEX(Blad2!$B:$D,INT((ROWS($1:1)-1)/3)+2,C1)

    then copy down.

    Hope this helps.

    Pete

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Repeating sequence, how?

    Pete, making it look so simple yet again.

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

    Re: Repeating sequence, how?

    Hi Moo,

    good to see you back - I noticed you posting again the other day.

    Pete

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

    Re: Repeating sequence, how?

    @pepijnkr,

    I see you are based in Holland, so you probably need to use semicolons ( ; ) in the various formulae, rather than the commas ( , ).

    Also, you show your Excel version as being 2000, which is why I didn't wrap IFERROR( ... ,"") around my formula. If you are using a later version, please update your profile.

    Hope this helps.

    Pete

  8. #8
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Repeating sequence, how?

    I try to pop in from time to time... kids are growing up, and lots of other stuff to fill the hours.

    - Moo (Vince)

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

    Re: Repeating sequence, how?

    Well, I just found out over Christmas that my eldest daughter is expecting a baby in the summer, so grandparents' duties might start to take over after that !!

    Pete

  10. #10
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Repeating sequence, how?

    Congratulations! My son will be 13 tomorrow, and my daughter will be 7 in a few days... so I have a few years before I have to worry about that

  11. #11
    Registered User
    Join Date
    06-14-2015
    Location
    netherlands
    MS-Off Ver
    2000
    Posts
    10

    Re: Repeating sequence, how?

    Thanks guys for all the help!

    As i am a noob with the MATCH command, I still don't get how i can copy the formula from my example sheet to my original file. That's why i posted a short fragment of my original file. I hope somebody can help me to fix the MATCH command in my original file.

    On page 1 of the example2 file I made a list next to the table of what cells should contain what.

    Hope you guys can help me!
    Attached Files Attached Files

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

    Re: Repeating sequence, how?

    I've had to change the entries in D1 to G1 of Blad1, and also in column C, as can be seen in the attached file, and then I used this formula in cell D2:

    =INDEX(Blad2!$B$2:$M$5,MATCH(LOOKUP("zzzz",$B$2:$B2),Blad2!$A$2:$A$5,0),MATCH(D$1&"_"&$C2,Blad2!$B$1:$M$1,0))

    (This might appear slightly different to you as I expect the function names will get translated into Dutch, and the commas will change to semicolons).

    This formula can then be copied across and down to fill your table, although you will have to re-instate the formats (lines) afterwards.

    Hope this helps.

    Pete
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    06-14-2015
    Location
    netherlands
    MS-Off Ver
    2000
    Posts
    10

    Re: Repeating sequence, how?

    Thanks again for the help.

    Still trying to get it to work, I uploaded my original file with this post.
    Don't know why but i can't get it to work.

    Thanks.
    Attached Files Attached Files

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

    Re: Repeating sequence, how?

    You have changed your IDs from text values to numbers, so the part of the formula that looks like this in D2:

    LOOKUP("zzzz",$B$2:$B2)

    no longer works - it should be changed to this:

    LOOKUP(9^9,$B$2:$B2)

    (The 9^9 is just a big number, larger than the values that you are using, in the same way as "zzzz" was just a large text value in the other formula).

    You can make the necessary changes quite easily in one operation using Find & Replace (CTRL-H). First, highlight the columns D to G in Blad1, then CTRL-H, and:

    Find what: "zzzz"
    Replace with: 9^9
    Click Replace All

    then you should see all those #N/A results change to the appropriate values.

    Hope this helps.

    Pete

  15. #15
    Registered User
    Join Date
    06-14-2015
    Location
    netherlands
    MS-Off Ver
    2000
    Posts
    10

    Re: Repeating sequence, how?

    Still doesn't work
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Repeating sequence, how?

    Try

    =INDEX(Blad2!$B$2:$M$756,MATCH(LOOKUP(9^9,$B$2:$B2),Blad2!$A$2:$A$756,0),MATCH(D$1&"_"&$C2,Blad2!$B$1:$M$1,0))

    no quotes round 9^9 as you are comparing numbers not text

  17. #17
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Repeating sequence, how?

    Quote Originally Posted by pepijnkr View Post
    Still doesn't work
    Change LOOKUP("9^9",$B$2:$B2)

    To LOOKUP(9^9,$B$2:$B2)

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

    Re: Repeating sequence, how?

    Isn't that what I said in Post #14 ?

    A week ago !!

    Pete

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

    Re: Repeating sequence, how?

    AND, after some delay, I received 14 email notifications of Post #15. Sheesh !!

    Pete

  20. #20
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    145

    Re: Repeating sequence, how?

    Quote Originally Posted by pepijnkr View Post
    Still doesn't work
    You probably didn't take Pete's instruction literally because your file has double quotes surrounding the 9^9. Remove the double quotes surrounding by repeating the search and replace

    Find what: "9^9"
    Replace with: 9^9
    Click Replace All and make sure you insert the phrases in the Find What inputbox exactly as shown.
    HtH,

    Joris

    --------------------------------------------------------------------------------
    If you found my answer helpful, please hit the Like or Thank button.

    Please follow the forum Rules and Guidelines and use Code tags around your VBA code.

    Remember: test VBA code always on a copy of your file because usually you can't use undo

  21. #21
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    145

    Re: Repeating sequence, how?

    Quote Originally Posted by pepijnkr View Post
    Still doesn't work
    You probably didn't take Pete's instruction literally because your file has double quotes surrounding the 9^9. Remove the double quotes surrounding by repeating the search and replace

    Find what: "9^9"
    Replace with: 9^9
    Click Replace All and make sure you insert the phrases in the Find What inputbox exactly as shown.

  22. #22
    Registered User
    Join Date
    06-14-2015
    Location
    netherlands
    MS-Off Ver
    2000
    Posts
    10

    Re: Repeating sequence, how?

    Thnx everyone

    closed

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

    Re: Repeating sequence, how?

    A couple of things, then, to wrap things up:

    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 and mark this thread as SOLVED.

    Also, since you are relatively new to the forum (in terms of posts), you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] repeating sequence
    By abhijit2610 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-21-2016, 11:12 AM
  2. Repeating sequence
    By HakeemJones in forum Excel General
    Replies: 9
    Last Post: 11-13-2014, 12:51 PM
  3. Autofill a pattern or repeating sequence
    By awcwa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2013, 12:04 PM
  4. Repeating a sequence
    By Slothook in forum Excel General
    Replies: 3
    Last Post: 10-28-2011, 04:05 PM
  5. Check (validate) repeating sequence
    By imimin in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-27-2010, 05:12 PM
  6. Repeating number sequence in a column
    By Nexan in forum Excel General
    Replies: 3
    Last Post: 03-31-2005, 03:06 PM
  7. [SOLVED] Repeating a sequence of numbers down a column
    By Nexan in forum Excel General
    Replies: 2
    Last Post: 03-04-2005, 02:06 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