lundi 10 décembre 2018

combine two if statements excel - based on condition

I am trying to find a way to combine these into one formula. I have tried many variations and splitting each into a separate true/false without any luck of consolidating to one answer for B2= "Price" vs B2 = "Note" (Note I am using Excel 2010). There are two criteria I need to test against if B2 is Preferred or Bond. I do not want to add more columns for each as there is a lengthy VBA code that I do not want to rewrite/break by changing the structure of the sheet.

=IF(AND(B2="Preferred", F2<>"Unrated",F2<>"BIG",F2<>"Data Not Found",OR(H2<31), OR(K2<>"Y")),"Y", "N")

=IF(AND(B2="Bond/Note", F2<>"Unrated",F2<>"BIG",F2<>"Data Not Found", OR(K2<>"Y")),"Y","N")

Aucun commentaire:

Enregistrer un commentaire