Hi, I have a code which filters a table, copies the filtered data and puts it into another table as values but this process takes too long (170-200 seconds to be precise!). If I convert the table to a range then paste, it takes about 15 seconds but destroys all my formulas with reference to headers i.e. employee[location] to sheetname/column name etc.
Is there anything that I can do to speed up the process?
I would appreciate any support.
Thank you.
Code:
Is there anything that I can do to speed up the process?
I would appreciate any support.
Thank you.
Code:
Code:
Sub ReceiveData()
Dim wb As Workbook
Dim t As Single
t = timer
Set wb = Workbooks("master.xlsb")
Set datatable = wb.Worksheets("alltemps").ListObjects("datatable")
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
datatable.Range.AutoFilter Field:=2, Criteria:="temps"
datatable.Range("A2:k3000").SpecialCells(xlCellTypeVisible).Copy
Calculate
ThisWorkbook.Sheets("local").Range("A2:k3000").Clear
ThisWorkbook.Sheets("local").Range("A2:k3000").PasteSpecial xlPasteValues
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
MsgBox (Format(timer - t, "0.000 secs"))
End Sub