+ Reply to Thread
Results 1 to 8 of 8

Averageifs using cell reference in criteria

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    3

    Averageifs using cell reference in criteria

    Hi there,

    I'm trying to use AVERAGEIFS to take the average of the values in a column that are > a low cutoff value and < a high cutoff value.

    In my sheet, the cutoff values are calculated in two cells, and I need to refer to those values in my AVERAGEIFS formula.

    Here's what I've tried so far:

    =AVERAGEIFS(H2:H81,H2:H81,">B10",H2:H81,"<B11")

    This gives me a #DIV/0! error.

    If I replace the cell references in the criteria clauses (">B10" and "<B11") I get the correct answer, so I guess it's not handling these sections correctly.

    Can anyone tell me what I'm missing?

    Thank you!

    Zoe

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

    Re: Averageifs using cell reference in criteria

    Try
    =AVERAGEIFS(H2:H81,H2:H81,">"&B10,H2:H81,"<"&B11)

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Averageifs using cell reference in criteria

    Yes! Excellent - thank you so much for the quick response, that worked perfectly.

    The syntax of this baffles me... What does the & indicate?

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

    Re: Averageifs using cell reference in criteria

    You're welcoem.

    The & is a shortcut for concatenate, to join 2 text strings together into 1.

    So a normal sumifs syntax for greater than some number is ">10"
    When you try to put a cell reference for the 10 like ">B10"
    It reads B10 literally as a text string "B10" (not the contents of the cell B10)

    so ">"&B10
    Takes the contents of the cell B10 as a text string, and joins it with the text string ">"
    So if B10 = 5 or whatever, then it's ">5"

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Averageifs using cell reference in criteria

    That's really useful info, thanks for your help!

  6. #6
    Registered User
    Join Date
    03-03-2014
    Location
    Greenacres, Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Sumifs using cell reference in criteria

    I have a problem similar to the one in this thread, I'd like to point to the text contents of a cell to use as criteria in my Sumifs function. My formula currently looks like this:

    =SUMIFS(Data!B:B,Data!A:A,"*CIP-168*")

    I want to pick up all cells in my criteria range with the text "CIP-168" in them, but I don't want to have to type it in my Sumifs formula, I want to reference a cell with the text "CIP-168" in it. I appreciate any help, thank you!

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Averageifs using cell reference in criteria

    JimmyMac22,

    Welcome to the forum.

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Registered User
    Join Date
    03-03-2014
    Location
    Greenacres, Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Averageifs using cell reference in criteria

    Thank you.

+ 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. Replies: 1
    Last Post: 12-04-2012, 04:46 PM
  2. Replies: 5
    Last Post: 08-14-2012, 10:45 AM
  3. Averageifs with OR criteria
    By Subject_Name_Here in forum Excel General
    Replies: 5
    Last Post: 05-28-2012, 01:57 PM
  4. [SOLVED] AVERAGEIFS using a cell reference in the criteria
    By John007 in forum Excel General
    Replies: 2
    Last Post: 01-10-2012, 05:22 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