The AVERAGEIFS function is perfect for this. It allows you to find the average value, for example, salary, only for rows that meet the criteria "city = Moscow" and "position = manager".

However, keep in mind: if the data contains zeros or empty cells, the result will be incorrect. To avoid this, add a third criterion for the salary column: ">&0".

For a comprehensive analysis across all cities and positions, it is better to use a pivot table. And to master all the nuances of working with functions, check out our large catalog of ready-made Excel formulas.

🔗 Source: excel.rf