+ Reply to Thread
Results 1 to 3 of 3

AVERAGEIFS with condition NOT to include cells with letter

  1. #1
    Registered User
    Join Date
    10-20-2021
    Location
    Alberta, Canada
    MS-Off Ver
    Office 365
    Posts
    1

    AVERAGEIFS with condition NOT to include cells with letter

    I am trying to Average columns in a spreadsheet (small portion attached, I HOPE) where I want to indicate that there is no information available by using an "X" character. I don't want to leave these cells blank, because then I keep looking at it thinking I need to find some information. I think I need to use the AVERAGEIFS formula, but can't figure out the syntax needed. If I use
    =AVERAGEIFS(N$6:N$32,$C$6:$C$32,"=2",N$6:N$32,"<>")
    I get #DIV/0 in cell N37, probably because cells N25, 26 and 27 have an X in them.

    If I use
    =AVERAGEIFS(N$6:N$32,$C$6:$C$32,"=2",N$6:N$32,"<>*x*")
    I also get #DIV/0 in cell N37.

    I want cell N37 to average any numerical values in N6:N32 ONLY if C6:C32 equals 2. The equation works for the ages that don't have any Xs in the required range N6:N32, but I'd really like to get rid of the #DIV/0 problem.

    I apologize if I have not made myself clear.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: AVERAGEIFS with condition NOT to include cells with letter

    None of the entries meet the criteria. Hence dividend and divisor are both zero, and so you get #DIV/0! Use IFERROR to "ignore" the error … set the result to 0 or null, depending on your preference.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: AVERAGEIFS with condition NOT to include cells with letter

    The AVERAGEIFS function would not include cells with letters in, as they would be text values with no numerical value, so you don't really need the second criteria.

    Hope this helps.

    Pete

    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. Only include numbers in a certain range for AVERAGEIFS
    By news98 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2020, 03:53 PM
  2. Applying AVERAGEIFS on columns that include text
    By byteroom in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-11-2019, 08:49 AM
  3. How to include specified months in a AverageIfs Formula
    By cartica in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2015, 11:11 AM
  4. [SOLVED] How to get an AVERAGEIFS formula to not include cell in average, by triggering switch?
    By Carmstrong227 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-19-2013, 01:15 PM
  5. AVERAGEIFS() with criteria that a string NOT include specific text
    By tjnelso in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 07:30 PM
  6. [SOLVED] Modifying AVERAGEIFS function to include certain data
    By Ezomz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-14-2013, 11:35 AM
  7. [SOLVED] Change a group of cells to include First Letter of First Name + Last Name
    By jordan1214 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2013, 02:07 AM

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