I'm trying to get an `AVERAGEIF` a few conditions are met (from another sheet: **SHEET1**). If the conditions aren't met, then I want a different `AVERAGEIFS` formula to go into effect.

Not sure how to combine these two arguments. They work fine on their own, but I want **Formula 2** to work if **Formula 1**'s conditions aren't met.

Should I be using `SUMPRODUCT` or nest these formulas together? Would appreciate some help combining these.

---

**Formula 1**

`=AVERAGEIFS('SHEET1'!R3:R105, 'SHEET1'!A3:A105, "x", 'SHEET1'!S3:S105, "*EWS*", 'SHEET1'!D3:D105, "SAV", 'SHEET1'!Q3:Q105, ">"&month(today())&"/"&day(today())&"/"&year(Today())-3)`

* where range to average: R3:R105

A3:A105 = x

S3:S105 contains EWS

D3:D105 = SAV

***Q3:Q105 date within past 3 years*** <-- reason Formula 1 fails is because this last condition is not met

.

If cell doesn’t meet Formula 1's conditions, then activate Formula 2:
---------------------------------------------------------------------

.

**Formula 2**

`=AVERAGEIFS('SHEET1'!R3:R105, 'SHEET1'!A3:A105, "x", 'SHEET1'!S3:S105, "*EWS*", 'SHEET1'!D3:D105, "SAV", 'SHEET1'!B3:B105, ">"&month(today())&"/"&day(today())&"/"&year(Today())-3)`

* where range to average: R3:R105
A3:A105 = x

S3:S105 contains EWS

D3:D105 = SAV

B3:B105 date within past 3 years

---

I tried a few things, but they ended up with errors. Is there a way to use the `IFERROR` function? I tried to substitute **Formula 2** into `value_if_error`, but got another error.