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.
I want to calculate the average on column E data.
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:
For x = wsCountMerge To wsIndex With twb .Sheets(x).Range("A2:O18").Copy .Worksheets("Summary").Select ActiveSheet.Range("B" & Rows.Count).End(xlUp).Offset(1).Select ActiveSheet.Paste For y = 1 To 17 ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1).Select ActiveCell.Value = .Sheets(x).Name ActiveCell.BorderAround , xlThin Next y End With Next x