Copy range to particular cell repetitively

  • Hello! I have this boring task to do.


    I have 3 columns with data (the rows in this columns are variable). I want to copy every row to another sheet in particular cells.


    First row in sheet 1 to sheet 3 in A11, B11, G11, then second row in sheet 1 to sheet 3 in I11, J11, O11, then third row in sheet 1 to sheet 3 in A24, B24, G24, fourth row in sheet 1 to sheet 3 in I24, J24, O24, and so on.


    So the used columns are always A, B, G, and I, J, O, and the rows increase of 13.

  • Re: Copy range to particular cell repetitively


    Hi D4n13l,


    Welcome to Ozgrid!!


    See how this macro goes:



    Regards,


    Robert

  • Re: Copy range to particular cell repetitively


    I change the sheets as you told me, it works, but I forgot to tell you that the columns in sheet 1 are the F, G and H, from row 3...


    Thanks for your help

  • Re: Copy range to particular cell repetitively


    Quote

    I change the sheets as you told me, it works, but I forgot to tell you that the columns in sheet 1 are the F, G and H, from row 3...


    I'm not sure what you mean as you originally said So the used columns are always A, B, G, and I, J, O?


    I think this is maybe what you're after:



    If not you'll have to attached a workbook with a before and after scenario so I can try and code a solution from that.


    Regards,


    Robert

  • Re: Copy range to particular cell repetitively


    I'm sorry, I'm working with D4n13l, but now he is on holiday, thats why I'm posting. The workbook I attached is right. I don't put the code, because, I made some changes, because D4n13l used merged cell that caused some error so I simplified the layout to avoid those merged cells.

  • Re: Copy range to particular cell repetitively


    Hi ginobuonpanino,


    OK that makes sense (probably would have helped to say that upfront).


    Try this:



    A more efficient way may be to have just six tickets (i.e. the number that you have set to fit on a single page) on Sheet3 that after all six have been populated, the page prints. This would solve the problem if you have more records than tickets and you'll have a small defined ticket range to maintain.


    Regards,


    Robert

  • Re: Copy range to particular cell repetitively


    Quote

    A more efficient way may be to have just six tickets (i.e. the number that you have set to fit on a single page) on Sheet3 that after all six have been populated, the page prints. This would solve the problem if you have more records than tickets and you'll have a small defined ticket range to maintain.


    Like so:


  • Re: Copy range to particular cell repetitively


    mmm... interesting... I think that the best way to save paper is to use just a single page with just a single ticket... I can find smaller paper size to fit the output layout. So the macro must populate the first ticket, print, clean the cells and loop... or create empty tickets and then print many times as are the rows with contents in sheet1. I attach a sample file...

  • Re: Copy range to particular cell repetitively


    It's a pity you didn't say this initially as it's the easiest solution by far:



    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!