VBA Script

  • Hi,

    I am hoping someone can help me with a script for the attached?

    On the data tab I could have any amount data so the script needs to work until it reaches a blank cell.

    Essentially, Column A (data) needs to be pasted into the load sheet column C for every instance there is a product in data column B. There could be 100 customer and 1 product or 100 customers and 10 products so there would be 1000 lines in this instance as there would be 100 * 10.

    The price then would need to be pasted for each product instance and the date requested into the load sheet as shown.

    I would need the grey cells on the load sheet un-edited.


  • The data is poorly designed. It would be much easier to copy the block of data in one move although this would mean re-arranging the data.

    Try this

  • Hi Roy,

    Many thanks but thats not quiet what i was looking for.

    For the attached. Every product in B Sheet2 should appear on Sheet1 for the entire customer list. On the attached there are 35 customers and 16 products so the result should have 560 Entries on sheet 1. They should then ahve the correct price and dates from sheet2....


  • Hi,

    Thank you but it is just copying the data. It needs to copy the customer for every instance there is a product. So 5 customers and 100 products there would be 500 lines if that makes sense? It would need to know when it reached the end also so that the amount of customers and products is essentially infinite.