lundi 13 juillet 2020

EXCEL VBA, IF odd and even with condition [duplicate]

I get this code in this forum, but I don't know how to give condition example if "A16" is not empty than "B16" can show either "YES" or "NO". If "A16" is empty, than nothing to show?

Sub OddRowAlert()      
With Range("B16:B100")   
    .Formula = "=IF((MOD(ROW(B16),2)),"YES","NO")"  
    .Formula = .Value  
End With  
End Sub

Aucun commentaire:

Enregistrer un commentaire