+ Reply to Thread
Results 1 to 4 of 4

Cloning a row X amount of times specified in a number value column

  1. #1
    Registered User
    Join Date
    12-15-2020
    Location
    WA, USA
    MS-Off Ver
    Office 365 - Excel 16.43
    Posts
    2

    Question Cloning a row X amount of times specified in a number value column

    Hello,

    I've looked over all the compilations I could find and am unable to determine if a formula is possible for what I need to do in Excel or not. Basically I'm trying to find a way to create copies of a row X times where X is the value given (always a whole number) in another column on the same row of the original document. So in example:

    Using the below column data:

    A | B |
    Amber | 4 |
    Carol | 2 |

    The desired output would turn into:

    A | B |
    Amber | 4 |
    Amber | 4 |
    Amber | 4 |
    Amber | 4 |
    Carol | 2 |
    Carol | 2 |

    The name existing a certain amount of times on separate rows is the important value. It doesn't matter what happens to the number in the second column so long as the name now exists on separate rows where count of rows is equal to the number given on the original document.

    I appreciate any help or even confirmation that a formula for this would not work.

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

    Re: Cloning a row X amount of times specified in a number value column

    next time, please add a sample file (yellow banner at top of page)

    For now see attached.

    =IFERROR(INDEX($A$2:$A$4,MATCH(0,INDEX(--(COUNTIF($D$1:D1,$A$2:$A$4)=$B$2:$B$4),0),0)),"")
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-15-2020
    Location
    WA, USA
    MS-Off Ver
    Office 365 - Excel 16.43
    Posts
    2

    Re: Cloning a row X amount of times specified in a number value column

    Thank you so much. That worked for me.

    Sorry about the attachment, I will make sure for next time.

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

    Re: Cloning a row X amount of times specified in a number value column

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It would also be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

+ 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. Fill column n amount of times then move to next column
    By Sash716 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2019, 08:25 AM
  2. Repeat number X amount of times
    By dechesne in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-20-2016, 09:50 AM
  3. Replies: 4
    Last Post: 12-10-2014, 08:47 PM
  4. Replies: 3
    Last Post: 02-19-2014, 10:47 AM
  5. [SOLVED] Limit the amount of times you can insert the same date in a column
    By craig0357 in forum Excel General
    Replies: 4
    Last Post: 01-03-2014, 04:45 PM
  6. Replies: 2
    Last Post: 05-09-2013, 06:17 AM
  7. [SOLVED] Cloning a file in a subfolder multiple times using VBA - possible?
    By Smeddlesboy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-06-2012, 11:17 AM

Tags for this Thread

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