Variable number of rows of data

  • Hello.
    I am hoping somebody can help me as my knowledge and logic have been exhausted.

    Problem:
    I have a workbook with 2 sheets in it.
    ‘Printer Macro’ from here known as ‘1’
    ‘Printer Header Sheet’ from here known as ‘2’

    A set of data is imported to ‘1’. It occupies columns A to L
    However the number of rows occupied changes each time the project is run and it is this that is causing me problems.
    What I am trying to achieve is:
    Step1: Select A:L from row 1. Copy the data. Go to ‘2’ and paste (values and format) into cell A2 of this sheet. Then print sheet ‘2’.
    Step 2: Repeat Step 1 but with Row 2 (A:L from ‘1’). Then paste into the same cell as step 1 (i.e. A2 of sheet ‘2’). Then print sheet ‘2’
    This repeats for every row in sheet ‘1’ with data in it.
    How can I get it to repeat the actions for all lines with data, one at a time, but stop if there is no data on a row (this being the end of the Macro?.
    Suggestions will be gratefully appreciated

  • Post your code that you currently have!

Participate now!

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