+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    11-12-2009
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Lookup and Return Average

    I want to have a dropdown list in column A(payee). Column B I will enter how much money was paid out. What i want is a seperate Spreadsheet on the same page that shows the average amount paid to that payee, and i guess if possible to have it show the total paid out for the year sort of thing. I have searched through the forums but can't seem to find anything. I'm sure its there but I can't seem to find it lol

    Thanks for the help
    Last edited by cecilj; 12-23-2009 at 12:19 PM. Reason: Marked Solved Based on Rep given

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,146

    Re: Lookup and Return Average

    So if you have the payees listed, say in column X, starting at X2, then in Y2

    =AVERAGEIF($A$1:$A$100,X2,$B$1:$B$100)

    where A1:A100 contains your selected names, and B1:B100 shows amounts paid.

    Adjust ranges to suit.

    Total would be similar but use Sumif()


    =SUMIF($A$1:$A$100,X2,$B$1:$B$100)
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    11-12-2009
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Lookup and Return Average

    Works Great!! the only problem i have which is a minor one is i get a #DIV0! error in the box if there are blanks on the payee section. is there a way to fix this?

  4. #4
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,146

    Re: Lookup and Return Average

    Perhaps

    =IF(COUNTA($A$1:$A$100)>0,AVERAGEIF($A$1:$A$100,X2,$B$1:$B$100),"")
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    11-12-2009
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Lookup and Return Average

    That didn't work got the same problem with the #DIV!0 error. Here is my exact formula
    the SUMIF works perfectly fine using the above formula you suggested.

    =AVERAGEIF($A$29:$A$55,J30,$C$29:$C$55)

    this is the new one you suggested with my adjustments

    =IF(COUNTA($A$29:$A$55)>0,AVERAGEIF($A$29:$A$55,J30,$B$29:$B$55),"")

  6. #6
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,146

    Re: Lookup and Return Average

    Maybe:

    =IF(AND(COUNTA(A29:A55)>0,COUNT($C$29:$C$55)>0),AVERAGEIF($A$29:$A$55,J30,$C$29:$C$55),"")

    this checks both column A and C for all blanks...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

Thread Information

Users Browsing this Thread

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

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.2.0