Copying parts of data into master data sheet

  • Hi I have a report which comes down each month as a PDF so i can copy the data and copy it into a new sheet on excel


    i.e this is my copied data


    A B
    1 10.1
    3 10.9
    4 11.6
    5 12.1
    6 15.7


    Though this can change


    i.e. next week it can be


    A B
    1 11.3
    4 13.1
    5 14.4
    6 13.1
    7 12.1


    And i want to copy it into a new sheet called master where i want to run some calculations etc


    i.e.


    A B(Week1) C(Week 2)
    1 10.1 11.3
    2 - -
    3 10.9 -
    4 11.6 13.1
    5 12.1 14.4
    6 15.7 13.1
    7 - 12.1


    Just wondering how I can do this automatically as there can be 100's of records.

  • Re: Copying parts of data into master data sheet


    Try this for results on sheet master.
    NB:- Run the code on each weeks new data, in data sheet (columns A & B), replacing the previous weeks data by the new data before running code.

  • Re: Copying parts of data into master data sheet


    That's brilliant thanks, just one quick question, i'm not hot on VB. How would you reset the column count?

  • Re: Copying parts of data into master data sheet


    I'm not quite sure what you would want to do !!
    Please show an example.

  • Re: Copying parts of data into master data sheet


    Say if I deleted the data on the master and then start again in column one for more weeks for input. Currently I can delete the data and when imputing new data it starts in the next available column

  • Re: Copying parts of data into master data sheet


    If you used cell "B1" in the data sheet for the Week Number you want in the master sheet to start from, you could then alter the line below to pick up this value.

    Code
    .Cells(1, col + 1).Value = "Week " & col +[b1]

Participate now!

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