+ Reply to Thread
Results 1 to 8 of 8

Need to average data excluding blanks that matches 2 vlookups.

  1. #1
    Registered User
    Join Date
    02-12-2017
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    9

    Need to average data excluding blanks that matches 2 vlookups.

    sss.jpg

    So my goal is to create a formula that will give me the average of "Recent Sale Price of BGS 9.5" excluding blanks and conditioned on "Rarity" and "BGS 9.5 POP".
    For example, in my entire data set there are 5 items that have "Rarity"=Rare and "BGS 9.5 POP"=1.
    4 of these items have a value for recent sale price, the last does not. I want to average the values that do have a recent sale price.

    I'm pretty weak at excel and need some help. I thought I would be able to get the data from pivot tables but i can't seem to get rid of the blank data that is affecting my averages.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,743

    Re: Need to average data excluding blanks that matches 2 vlookups.

    =averageifs()
    should do that for the two conditions

    rare
    = C

    BGS 9.5 POP
    = E

    =averageifs(g:g, c:c , "rare" , e:e, 1)

    that will be if rare and 1 on same row

    average should not include blank cells
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-12-2017
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    9

    Re: Need to average data excluding blanks that matches 2 vlookups.

    So I tried your formula and its giving me a not divisible by zero error "#DIV/O!". I'm not sure why. I tried multiple different variables but I am getting the same result. Any thoughts?

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

    Re: Need to average data excluding blanks that matches 2 vlookups.

    In your picture none of the items with rare in column C have a value of 1 in column E. If you want to avoid the error, you can wrap IFERROR( ... ,"") around the formula.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    02-12-2017
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    9

    Re: Need to average data excluding blanks that matches 2 vlookups.

    Screen Shot 2017-02-13 at 8.05.46 PM.png

    I'm still getting errors no matter what data is being used. Why does this formula result in an error also? There is a Rare Pop 3 item in the data set. I appreciate your help, just want to finish this problem. Thanks.

  6. #6
    Registered User
    Join Date
    02-12-2017
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    9

    Re: Need to average data excluding blanks that matches 2 vlookups.

    So playing with the formula the problem is happening in the Rarity column. For whatever reason it doesn't want to accept this column. If I change the criteria to color it works with no issues. Any ideas what might be causing this problem?
    Last edited by jdiegelmann; 02-13-2017 at 07:21 AM.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Need to average data excluding blanks that matches 2 vlookups.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Need to average data excluding blanks that matches 2 vlookups.

    Check that the entries for "Rare" in column C are spelt exactly like that, i.e. with no leading or trailing spaces.

    Pete

+ 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. database: Copy data from range excluding blanks plus one cell on another column
    By danwoltrs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2016, 10:24 AM
  2. [SOLVED] Data by month while excluding blanks and text
    By Pulgasari in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-13-2015, 09:07 AM
  3. Average formula for last 15 days excluding blanks
    By jimbob23 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-22-2014, 11:50 AM
  4. [SOLVED] Create a list of uppercase data from a range excluding blanks and errors
    By PAexcel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-17-2014, 01:32 PM
  5. Replies: 4
    Last Post: 06-11-2014, 07:56 AM
  6. Replies: 6
    Last Post: 08-16-2013, 10:04 PM
  7. [SOLVED] Function To Build A List For A Drop Down, Excluding Blanks And Non-Matches.
    By GEANZ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-02-2013, 11:35 PM

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