+ Reply to Thread
Results 1 to 9 of 9

Vlookup that returns he average value for items with multiple values

  1. #1
    Registered User
    Join Date
    03-18-2017
    Location
    College Station, Texas
    MS-Off Ver
    Office 2013
    Posts
    20

    Vlookup that returns he average value for items with multiple values

    Attached is the relevant workbook.

    I need a formula that does the following:
    -Enter Job Code
    -Finds Salary data for Job Code in another worksheet
    -Averages the salaries for the job code
    -Returns a single average salary figure for each job code


    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Vlookup that returns he average value for items with multiple values

    You can use this formula in B2 of Sheet2:

    =IFERROR(AVERAGEIF(Sheet1!A:A,A2,Sheet1!B:B),"")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-18-2017
    Location
    College Station, Texas
    MS-Off Ver
    Office 2013
    Posts
    20

    Re: Vlookup that returns he average value for items with multiple values

    Bump for views

  4. #4
    Registered User
    Join Date
    03-18-2017
    Location
    College Station, Texas
    MS-Off Ver
    Office 2013
    Posts
    20

    Re: Vlookup that returns he average value for items with multiple values

    Quote Originally Posted by Pete_UK View Post
    You can use this formula in B2 of Sheet2:

    =IFERROR(AVERAGEIF(Sheet1!A:A,A2,Sheet1!B:B),"")

    Hope this helps.

    Pete
    It needs to be a lookup

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Vlookup that returns he average value for items with multiple values

    No it doesn't.

    Just try it.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Vlookup that returns he average value for items with multiple values

    Quote Originally Posted by AggieGradStudent View Post
    It needs to be a lookup
    Why?

    VLOOKUP is not appropriate in this case as it will return ONLY the first occurrence where you have multiple values.

    Pete

  7. #7
    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
    52,946

    Re: Vlookup that returns he average value for items with multiple values

    Quote Originally Posted by AggieGradStudent View Post
    It needs to be a lookup
    why?

    Is this a homework assignment?
    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

  8. #8
    Registered User
    Join Date
    03-18-2017
    Location
    College Station, Texas
    MS-Off Ver
    Office 2013
    Posts
    20

    Re: Vlookup that returns he average value for items with multiple values

    It's been resolved. And no it didn't need to be a lookup apparently haha

    Pete's formula worked perfectly!

  9. #9
    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
    28,369

    Re: Vlookup that returns he average value for items with multiple values

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Can I use Vlookup to return multiple values and then get average?
    By boltsg4 in forum Excel General
    Replies: 4
    Last Post: 07-20-2016, 03:01 PM
  2. [SOLVED] Having trouble looking up multiple values for unique items - VLOOKUP not helping
    By Origin528 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-07-2015, 07:48 PM
  3. [SOLVED] Sum of values from VLOOKUP returns
    By excel_newser in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-07-2014, 02:22 PM
  4. [SOLVED] Average of multiple vlookup values from another sheet
    By lostinmsexcel in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-17-2014, 12:53 PM
  5. Excel 2007 : Vlookup returns multiple values in Dropdown
    By arv1980 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-16-2013, 04:20 AM
  6. VLOOKUP that returns multiple values from a prior column
    By C.Houston in forum Excel General
    Replies: 1
    Last Post: 07-26-2012, 12:44 PM
  7. Average from Vlookup returns
    By edmdas in forum Excel General
    Replies: 9
    Last Post: 03-11-2009, 11:52 AM

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