وعليكم السلام ورحمة الله وبركاته
ضع هذا الكود في ملفك وشغله ستجد ملف باسم ملف REEL_DATA_OF_NOVEMBER_2021.Xlsb بجوار ملفك
Sub Total()
Dim ws As Worksheet, temp As Variant, arr As Variant, F As Boolean, lr As Long
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.DisplayAlerts = False
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Total" And ws.Name <> "SUMMARY" And ws.Name <> "TIME" And ws.Name <> "HOLD" Then
temp = ws.Range("A6:S" & ws.Cells(Rows.Count, 2).End(xlUp).Row).Value2
If F Then
Dim I As Long, ii As Long, ub As Long
ub = UBound(arr, 1)
arr = Application.Transpose(arr)
ReDim Preserve arr(1 To UBound(arr, 1), 1 To ub + UBound(temp, 1))
arr = Application.Transpose(arr)
For I = LBound(temp, 1) To UBound(temp, 1)
For ii = 1 To UBound(temp, 2)
arr(ub + I, ii) = temp(I, ii)
Next ii
Next I
Else
arr = temp
F = True
End If
End If
Next ws
If Not Evaluate("isref('" & "Total" & "'!A1)") Then Sheets.Add.Name = "Total"
With Sheets("Total")
.Range("A2:S65536").ClearContents
.Range("A1").Resize(1, 19).Value = Array("V", "HH", "J", "K", "L", "DD", "HH", "K", "L", "P", _
"GG", "S", "DF", "GH", "HJ", "KJ", "FGH", "G", "Remarks")
.Range("A2").Resize(UBound(arr, 1), UBound(arr, 2)).Value2 = arr
With .Range("A1:S" & .Cells(Rows.Count, 2).End(xlUp).Row)
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.RowHeight = 15
ActiveWindow.Zoom = 75
.EntireColumn.AutoFit
.Borders.Value = 1
End With
End With
ThisWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & "REEL_DATA_OF_NOVEMBER_2021", FileFormat:=xlExcel12
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.DisplayAlerts = True
End Sub