誰かがお手伝いできるかどうか疑問に思っていましたか?次の行にエラーが表示されます。条件付きフォーマットエラーVBA
.Add Type:=xlExpression, Formula1:= _
"=IF($E1<>"",AND($E1<TODAY(),$F1=""Awaiting Information"")) = 1"
以下のコードがあります。
Sub ConditionalFormat()
Sheets("NACO").Cells.FormatConditions.Delete
With Worksheets("NACO").Columns("A:N").FormatConditions
**.Add Type:=xlExpression, Formula1:= _
"=IF($E1<>"",AND($E1<TODAY(),$F1=""Awaiting Information"")) = 1"**
With .Item(.Count).Interior
.Color = 255
End With
.Add Type:=xlExpression, Formula1:= _
"=IF($E1<>"",AND($E1<TODAY(),$F1=""On Going"")) = 2"
With .Item(.Count).Interior
.Color = 225
End With
.Add Type:=xlExpression, Formula1:= _
"=IF($E1<>"",AND($E1<TODAY(),$F1=""Awaiting Quotation"")) = 3"
With .Item(.Count).Interior
.Color = 255
End With
.Add Type:=xlExpression, Formula1:= _
"=$F1=""On Going"" = 4"
With .Item(.Count).Interior
.Color = RGB(247, 150, 70)
End With
End With
End Sub
誰かがエラーが発生している理由を説明してください。それは ""と関係がありますか?
'$ E1 <>" "' $ E1 <> "'は二重にする必要があります –
リテラル文字列の中にリテラルの二重引用符文字を含めると、引用符を二重にする必要があります。 "<>" "は$ E1にする必要があります<>" "" " –
板張りのものを感じます"と私は思っていました。 –