VBA code in Macro to copy data from one sheet to another without pasting formulas

  • hi,

    I need some help please with my VBA code. Totally new to VBA and Macro's!
    I have a Worksheet which is recording a list of tasks a team member plans and actually completes each day.
    The sheet has formulas to calculate the task time and insert dates etc.
    I have created a macro which copies the data in certain cells and pastes just the values to another worksheet.
    I then have a macro which clears these cells and they can be used again the next day to input their planned and actual tasks.
    Problem is, when I extract the next days information, it is leaving a hugh gap between todays and tomorrows listed tasks. It is not looking for the next available line but inputting at the end of the last copy. So for example, a user has the option to input 50 tasks (certain cells prefilled with formulas which populate if other cells are filled). If the user only inputs 5 tasks, it still copies the 50 lines over to my new workbook but as there are only formulas and no data in 45 of the lines, it pastes blanks. But on the next copy, it starts at line 51 instead of line 6. Hope this makes sense!
    Here is the code I've input so far:

    Any help greatly appreciated.
    Kind regards,

  • Re: VBA code in Macro to copy data from one sheet to another without pasting formulas


    It does make sense. There are lots of websites dealing with questions on how to return a truly empty cell with no direct solution, only workarounds.

    So, in a workaround for your case, some additional code could be added to clear the blank cells after pasting the data.

Participate now!

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