+ Reply to Thread
Results 1 to 23 of 23

Repeating sequence, how?

Hybrid View

  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
    =INDEX(Blad2!$B$2:$D$4,MATCH(B1,Blad2!$A$2:$A$4,0),MATCH(C1,Blad2!$B$1:$D$1,0))
    - 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,212

    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,825

    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,825

    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,825

    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
    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

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

    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

  11. #11
    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

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,949

    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)

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

    Re: Repeating sequence, how?

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

    A week ago !!

    Pete

  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,825

    Re: Repeating sequence, how?

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

    Pete

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

    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

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

    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.

  17. #17
    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,378

    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

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

    Re: Repeating sequence, how?

    Thnx everyone

    closed

  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,825

    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