=IF(AY2=AX2,AW2,""). Can any please help me how to write theb above formula in excel VBA. I have already copied this formula in VBA, but the output shows '1004' error,
I have already copied this formula in VBA, but the output shows '1004' error,
=IF(AY2=AX2,AW2,""). Can any please help me how to write theb above formula in excel VBA. I have already copied this formula in VBA, but the output shows '1004' error,
I have already copied this formula in VBA, but the output shows '1004' error,
Use IIF()
in VBA. Try-
Sub TestIIF()
Debug.Print IIf(Range("AY2") = Range("AX2"), Range("AW2"), "")
End Sub