I found a great way to exclude outliers from a statistical excel formula, that requires only one row, such as AVERAGE.

```
{=AVERAGE(IF(AC4:AC22<>"",IF(AC4:AC22>=138,IF(AC4:AC22<=144,AC4:AC22))))}
```

But how can I use this IF-nesting for formulas that require two rows for Y and X values? The values for the IF evaluations would be in a third row.

Here is my example: Excel, calculate the INTERCEPT (X;Y) IF value in row Z ranges between 100 and 150

I tried another way. But it yields FALSE:

```
{=IF(AND(C4:C24>=138,C4:C24<=144,C4:C24<>""),INTERCEPT(B4:B24,A4:A24))}
```