# AverageIFS based on multiple vlookup Criteria

#### Mitchx

##### New Member
Hi guys,

I am looking for help as I am kinda stuck, I have a formule where I am comparing four columns with an IF/AND formula to a vlookup column to see if a matched value can be found.
Basically every value has to find a matching value before we proceed to averaging the amount corresponding to the four matching criteria.

The formula below is working and gives me a 1 if every criteria is being matched, and a 0 if not. My problem is I want to find the average value (another column named 'ATP combi'!C:C', the amounts can be found here)
But I only want to average the matched criteria, so not the whole column.

=IF(AND(VLOOKUP(merk_input;'ATP combi'!F:F;1;0)=merk_input;VLOOKUP(model_input;'ATP combi'!G:G;1;0)=model_input;VLOOKUP(looptijd_input;'ATP combi'!I:I;1;0)=looptijd_input;VLOOKUP('Input kostprijsanalyse'!G54;'ATP combi'!H:H;1;0)='Input kostprijsanalyse'!G54);1;0)

How would get the average of column C, as mentioned above in this formula?

Please assist me, or feel free to ask any questions!

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I think I might be misunderstanding what you are trying to do.
Did the following not work for you ?
Excel Formula:
``````=AVERAGEIFS('ATP combi'!C:C,
'ATP combi'!F:F,merk_input,
'ATP combi'!G:G,model_input,
'ATP combi'!I:I,looptijd_input,
'ATP combi'!H:H,'Input kostprijsanalyse'!G54)``````

I think I might be misunderstanding what you are trying to do.
Did the following not work for you ?
Excel Formula:
``````=AVERAGEIFS('ATP combi'!C:C,
'ATP combi'!F:F,merk_input,
'ATP combi'!G:G,model_input,
'ATP combi'!I:I,looptijd_input,
'ATP combi'!H:H,'Input kostprijsanalyse'!G54)``````

Hi Alex,

This is exactly what I needed, I made it myself too complicated.
Thank you very much man!

No problem. Glad we could help & thanks for letting me know.

Replies
10
Views
457
Replies
5
Views
419
Replies
2
Views
161
Replies
1
Views
370
Replies
1
Views
292

Threads
1,203,052
Messages
6,053,231
Members
444,648
Latest member
sinkuan85

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back