dimanche 17 juillet 2016

VBA to replace large Excel Nested IF AND Statement

I have a large Nested IF AND Statement and I want to avoid using it in vba as is since its unmanageable.

I'll use a simple example: Range("O2").Formula = "=IF(M2>TODAY(),""VALIDATED"",IF(AND(N2="""",M2=""""),""NEW ITEM"",IF(AND(N2=""NEW ITEM"",M2

What VBA code can I use instead as there are a lot more IF statements to add. Also I want to avoid having to use a loop since there will be 1000's of row.

Any help would be appreciated.

Cheers,

Conor

Aucun commentaire:

Enregistrer un commentaire