VBA: Chuyển format conditional thành màu để tính toán :RemoveConditionalFormattingButKeepColors

 Do màu fill bằng format conditional sẽ không thể dùng để tính toán nên phải chuyển những ô này thành fill màu bình thường.

Chọn vùng cần bỏ Format conditional và chạy code sau:


Sub removeConditionalFormattingButKeepColors() Dim cell As Range For Each cell In Selection cell.Interior.Color = cell.DisplayFormat.Interior.Color Next Selection.FormatConditions.Delete MsgBox "Done removing conditional formatting rules." End Sub

Nhận xét