# Thread: Nested if or function Thanks: 0 Likes: 0

1. ## Nested if or function

I have a nested IF OR formula, but both of the criteria to evaluate has the same result. My formula is:

 =IF(OR(\$A\$4<>"D",\$A\$4=\$D\$3),IF(INDEX(DATA!\$A\$11:\$P\$89,MATCH(\$A76,DATA!\$A\$11:\$A\$89,0),1)=\$A76,OFFSET(DATA!\$P80,0, (-DATA!\$P\$8)),"Error"),IF(INDEX(DATA!\$A\$11:\$P\$89,MATCH(\$A76,DATA!\$A\$11:\$A\$89,0),1)=\$A76,OFFSET(DATA!\$P80,0,(-DATA!\$P\$8)) ,"Error"))

The formula works ok, but as both options for A4 has the same result, is there a way I can shorten this formula and
make it less complex?  Reply With Quote

2. ## Re: Nested if or function

Hi,

You don't need the duplicated 2nd half of the formula, try it like this:

=IF(OR(\$A\$4<>"D",\$A\$4=\$D\$3),IF(INDEX(DATA!\$A\$11:\$P\$89,MATCH(\$A76,DATA!\$A\$11:\$A\$89,0),1)=\$A76,OFFSET(DATA!\$P80,0,(-DATA!\$P\$8)),"Error"),"Error")  Reply With Quote

3. ## Re: Nested if or function

good solution  Reply With Quote

## User Tag List

complex, formula, nested, options, result 