Excel VBA AVERAGE(variable range)

  • Description:
    What I am try to do is merge specific sheet from my folder into the current workbook then copy the all the merge data sheets to summary sheets and calculate certain columns average.


    For example:
    I want to calculate the average on column E data.


    My problem:
    The range of data is very dynamic, which I don't know how to implement this dynamic range into macro script
    For now I just manually insert the formula on the lastrow of the column any help will be appericiated.


    My code so far:

  • Can you attach an example workbook.


    You probably don't need VBA, you might be able to do this with PowerPivot and a PivotTable

  • Hello,


    Regarding the Item # 5 of your Instruction sheet ...


    You could test following:



    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

Participate now!

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