mardi 23 juillet 2019

How to check if value exist only in one or other range else give error?

I am trying to create an error check and do conditional formatting if there is an error.

Logic test required to pass is that either range I7:J7 should contain any value or range K7:N7 should contain a value, if there is a value in both the range then give an error. If both the ranges are blank then no error.

I am currently using below formula to check above logic, but it does not give error when both the ranges have value.

=IF(ISBLANK(H7),"",IF(XOR(COUNTIF(I7:J7,""),(COUNTIF(K7:N7,""))),"","ERROR"))

Please advise how I can get desired error check.

Thanks

Aucun commentaire:

Enregistrer un commentaire