I have an Excel file with formulas in this manner:
=IF(OR(ISERROR(G16),ISERROR(G17)),X16,IF(OR(G16=\"xxx\",G16=\"yyy\",G16=\"zzz\"),Y16,IF(G16=\"333\",\"N\\A\",IF(
Naming some of the cells you refer to might make the whole thing more readable