Solved

How to use VLookUp or any other function to retrieve average values of cells?

Posted on 2013-12-18
8
391 Views
Last Modified: 2013-12-18
Hello experts,

You can use the VLOOKUP function to search the first column of a range of cells, and then return a value from any cell on the same row of the range.

Is there anyway I can return all cells that meet my search criteria and average them, rather than only getting the first match.
0
Comment
Question by:Mehawitchi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39726513
You can use MATCH to get the row number.

From that you can use the OFFSET function to get a number of columns in that particular row and then you can average it.
0
 

Author Comment

by:Mehawitchi
ID: 39726518
Thanks  ssaqibh

I'm not quite sure how to build this into a formula

Can you show me an example please
0
 
LVL 51

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 50 total points
ID: 39726523
Hi,

Why not use

=SUMIF(D1:D5,1,E1:E5)/COUNTIF(D1:D5,1)

Open in new window

Regards
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 100 total points
ID: 39726525
Here is a sample
lookup-Average.xlsx
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 350 total points
ID: 39726555
If you are using excel 2007 or later then AVERAGIF function allows you to average data based on a criterion, e.g. to average all cells in column B when column A = "x"

=AVERAGEIF(A:A,"x","B:B)

regards, barry
0
 

Author Closing Comment

by:Mehawitchi
ID: 39726594
Barry's solution is exactly what I need.
Thank you all
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39726596
I clearly misunderstood your requirements. You should have awarded all points to Barry.
0
 

Author Comment

by:Mehawitchi
ID: 39726618
No worries ssaqibh. You made a good attempt after all
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question