Sub Tester()
ClearFormulaCF Range("A1:A5"), "=ISBLANK(A19)=TRUE"
End Sub
'Remove any CF rule from cells in rng where the CF formula
' matches the one provided
Sub ClearFormulaCF(rng As Range, sFormula As String)
Dim rngCF As Range, c As Range, fc As FormatCondition
On Error Resume Next
'any cells with CF?
Set rngCF = rng.SpecialCells(xlCellTypeAllFormatConditions)
On Error GoTo 0
If rngCF Is Nothing Then Exit Sub 'no CF found
For Each c In rngCF.Cells
For Each fc In c.FormatConditions
If fc.Formula1 = sFormula Then
fc.Delete
Exit For
End If
Next fc
Next c
End Sub
안녕하세요, 감사합니다. Tim, 일찍 응답하지 않아서 죄송합니다. 다른 것들로 바빴습니다. 질문을해도 될까요? 여기에 작업 순서는 무엇입니까? 셀에 착륙하면 Sub Tester와 Sub ClearFormulaCF를 호출합니까? 또는 Tester가 전에 불려 왔습니까? –
"테스터 (Tester)"는 실제 코드를위한 스탠드 - 인으로, 어떻게 'ClearFormulaCF'를 사용 하는지를 보여줍니다. –