Mình đã chuyển sang đuôi xlam nhưng vẫn không có hiện lên thanh Ribbon. Mình gửi Code và file để bạn xem giúp mình.
Option Explicit
Sub TONGHOP()
Dim Ws As Worksheet, Arr, dArr, I&, K&
ReDim dArr(1 To 100000, 1 To 29)
Application.ScreenUpdating = False
For Each Ws In Worksheets
If Ws.Name = "MP" Or Ws.Name = "DA" Or Ws.Name = "SVN" Then
Arr = Ws.Range(Ws.[A5], Ws.[A6500].End(3)).Resize(, 29).Value
For I = 1 To UBound(Arr)
K = K + 1
dArr(K, 1) = K
dArr(K, 2) = Arr(I, 3)
dArr(K, 3) = Arr(I, 7)
dArr(K, 4) = Arr(I, 9)
dArr(K, 5) = Arr(I, 11)
dArr(K, 6) = Arr(I, 12)
dArr(K, 23) = "=sum(RC[-1]:RC[-16])"
dArr(K, 24) = "=RC[1]*RC[-19]"
dArr(K, 25) = Arr(I, 5)
dArr(K, 26) = "=IF(RC[-3]>RC[-2],""NG"",""OK"")"
dArr(K, 27) = "=RC[-4]-RC[-3]"
dArr(K, 28) = Arr(I, 13)
dArr(K, 29) = Arr(I, 8)
Next I
End If
Next Ws
With Sheets("Ton Kho")
.Range(.[A5], .[A65000].End(3)).Resize(, 29).Borders.LineStyle = 0
.Range(.[A5], .[A65000].End(3)).Resize(, 29).ClearContents
If K Then
.Range("A5").Resize(K, 29) = dArr
.Range("A5").Resize(K, 29).Borders.LineStyle = 1
End If
End With
Application.ScreenUpdating = True
End Sub
Cảm ơn bạn