+ Reply to Thread
Results 1 to 6 of 6

Repeat a row multiple times

  1. #1
    Registered User
    Join Date
    12-22-2020
    Location
    Delhi
    MS-Off Ver
    MS OFfice 365 ProPlus
    Posts
    6

    Repeat a row multiple times

    Hi I have a data with multiple columns and need to repeat the same 7 times and then add additional information in last column. Please find attached file.

    all existing records need to be repeated exactly 7 times
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Repeat a row multiple times

    Hi,

    This is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    For instance it's not clear if you want to repeat the data seven times, just once, or seven times say every week. Mention of 7 times suggests these are records that reflect a day of the week. In which case you should really be including a date against each record. Then it may not be necessary to always have 7 records for each name if there is no data on some occasions.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-22-2020
    Location
    Delhi
    MS-Off Ver
    MS OFfice 365 ProPlus
    Posts
    6

    Re: Repeat a row multiple times

    Hi Please refer the attached sheet where 'Current data' displays my data in existing format with 10 columns

    I need to repeat these records multiple times and add an additional column at the end (Please refer sheet) 'Expected Result'

    adding screenshots as well
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-04-2020
    Location
    Bangkok
    MS-Off Ver
    365
    Posts
    61

    Re: Repeat a row multiple times

    Please try this
    Since you're using Office365, so all the results will be auto-spilled.

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


    Formulas for other columns are in the attached file.
    Attached Files Attached Files

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Repeat a row multiple times

    Please try

    Please Login or Register  to view this content.
    or with LET function

    =LET(a,'Current data'!A2:J5,s,SEQUENCE(ROWS(a)*7,,0),b,INDEX(a,INT(s/7)+1,SEQUENCE(,11)),IFERROR(IFERROR(b+MOD(s,7),b),INDEX({"BUS";"Common";"HD";"HD PRO 6000";"LMD";"Parts";"Sub 5T"},MOD(s,7)+1)))
    Attached Files Attached Files

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

    Re: Repeat a row multiple times

    Or (simpler formulae!!)
    =IFERROR(INDEX('Current data'!A:A,AGGREGATE(15,6,ROW('Current data'!$A$2:$A$10)/('Current data'!$A$2:$A$10<>""),1+INT((ROWS(A$2:A2)-1)/7))),"")
    in a2, copied across and down, then in K2, copied down:


    =IF(A2="","",INDEX({"BUS","Common","HD","HD PRO 6000","LMD","Parts","Sub 5T"},1+MOD((ROWS(K$2:K2)-1),7)))
    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

+ 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] Repeat columns multiple times as rows
    By AF_Z in forum Excel General
    Replies: 11
    Last Post: 08-01-2019, 12:58 PM
  2. Copy a single cell from one sheet and repeat multiple times on another.
    By bone7890 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-22-2017, 02:21 PM
  3. How can I move multiple cells more quickly and repeat it several times.
    By dustinshaw in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-17-2016, 08:50 PM
  4. [SOLVED] Repeat formula X times - once X times has been achieved then Y - repeat X again
    By jonnym28 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-25-2015, 11:53 AM
  5. Replies: 4
    Last Post: 03-08-2014, 08:01 AM
  6. [SOLVED] Faster Way To Repeat Values Multiple Times
    By non-hype in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2013, 10:59 PM
  7. Need macro help with transposing columns to rows and repeat a row value multiple times
    By InnovativeAJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2012, 11:53 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