Forum Discussion
Rai_Sahab
Dec 03, 2021Copper Contributor
How to use vlookup with average function
How to Use VLOOKUP to return the Average Salary of Sales Department.
HansVogelaar
Dec 03, 2021MVP
Rai_Sahab
Dec 03, 2021Copper Contributor
Even I thought that would have been much logical but the question in this exercise asked to use one function of vlookup to find average salary of sales department.
Is there any way we can get the correct answer using vlookup
Is there any way we can get the correct answer using vlookup
- HansVogelaarDec 03, 2021MVP
VLOOKUP is not a suitable function for calculating an average. The exercise makes no sense.
- Detlef_LewinDec 03, 2021Silver Contributor
You could do a crazy workaround.
In E13 type Sales.
In F13:
=AVERAGIFS($C$2:$C$55,$B$2:$B$55,E13)
In F3:
=VLOOKUP(F2,E13:F13,2,FALSE)
- HansVogelaarDec 03, 2021MVP
That way, you can use VLOOKUP in any formula in Excel! One could create this formula
=N(SUM(PRODUCT(VLOOKUP(F2,E13:F13,2,FALSE))))
and claim that all these functions were used to return the average.
By the way, your formula has a point instead of a comma.