+ Reply to Thread
Results 1 to 4 of 4

Need help with a Vlookup that will return an Average

  1. #1
    Registered User
    Join Date
    11-11-2013
    Location
    chiacago
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need help with a Vlookup that will return an Average

    Hello All,

    I am having trouble nesting an average with a vlookup. I have a file that has a list of US zip codes that are linked to airports and then either an "outside" and/or "metro" area with pickup costs. I need to be able to create a lookup that will return the average cost for both Metro and/or Outside for each given station. I have created a lookup value that indicates the station name and whether or not it is outside - or - metro (EXAMPLE: LAXMetro). The problem is that when I use this function =AVERAGE(VLOOKUP(N2,J2:L713,3,FALSE)) I get back only the first instance of - for example again - LAXMetro and not the average of LAXMetro. What am I missing here? Please see attached file (this has been cut down to only show LAX for the purpose of upload as the actual file is far too big and inclusive of all US postal codes), my formula is in the table in columns N-Q. Thanks in advance for your help! I am using Excel 2010, if that will help you, help me, figure this out.

    Regards

    Kyle
    Attached Files Attached Files
    Last edited by kylenls; 08-20-2015 at 02:41 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Need help with a Vlookup that will return an Average

    Try this instead...
    =AVERAGEIF($J$2:$J$713,N2,$L$2:$L$713)

    Also, in your vlookup, you need to absolute the lookup range, or it will change as you copy it...
    =VLOOKUP(N2,$J$2:$L$713,3,FALSE)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Need help with a Vlookup that will return an Average

    in P2

    =AVERAGEIF($J$2:$J$713,$N2,$L$2:$L$713)

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need help with a Vlookup that will return an Average

    This looks a job to me for a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Vlookup to return multiple rows in return
    By Excelhelpss in forum Excel General
    Replies: 1
    Last Post: 06-18-2015, 09:59 AM
  2. [SOLVED] Formula to always return cell below what a vlookup would return
    By KCHEXCEL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 12:57 AM
  3. [SOLVED] Find Average, Return Column Header of Number Closest To Average
    By djmyers in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-07-2013, 04:19 PM
  4. Replies: 14
    Last Post: 06-14-2013, 09:00 PM
  5. Replies: 5
    Last Post: 06-19-2012, 04:37 PM
  6. average annual return
    By rathersurf in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] average annual return
    By rathersurf in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1