Không biết đúng ý bạn không nửa? Hên xui ngheCác bạn giúp mình xử lý Yêu Cầu như sau:
Cột D không cho phép chỉnh sửa (Khóa): bằng lệnh VBA
Đặt công thức bằng VBA để hiểu D= (B+C)/2
Đặt định dạng là 123.345,78 bằng VBA ở cột D
Cảm ơn các bạnView attachment 148921
Không biết đúng ý bạn không nửa? Hên xui nghe
Sub Cthuc_Dinhdang()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
With Sheets(1).Range("D2:D" & Range("A1").End(xlDown).Row)
.Formula = "=(C2+D2)/2"
.NumberFormat = "#,##0.00"
End With
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub