+ Reply to Thread
Results 1 to 9 of 9

Averaging formula assistance

  1. #1
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Averaging formula assistance

    I have an average formula set up. Is there a way to exclude one of the cells while still leaving a number in the cell.

    For example: 15,20,17,18,55,14,12
    I want to calculate the average for the following numbers but it appears that 55 is an out lying number. Is there a way to create a drop down box or something that say calculate the average but exclude the 55 in the calculation?

  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,445

    Re: Averaging formula assistance

    You could sum the values and subtract the maximum value and then divide by the count minus 1


    Regards, TMS
    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
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Averaging formula assistance

    I considered that but it could also be the opposite way and a number could be too low compared to the others. I am trying to find a way to apply this to an entire worksheet that is a template for future use as well as current.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Averaging formula assistance

    If you are willing to add a helper column, here's how I do this:

    1) In an adjacent column, enter a "toggle" value that I use to indicate whether or not to include the value in the average. I tend to use 1 or 0, but it could also be y/n or whatever you fancy.
    2) My average then becomes =SUMIF(helper_column,1,data_column)/countif(helper_column,1)
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Averaging formula assistance

    I understand what you are trying to say but I cant figure out how to write the sumif formula because it returns a too many arguments error message. I have attached an example of what i am working with.
    Capture.PNG

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Averaging formula assistance

    Help file for the SUMIF() function: http://office.microsoft.com/en-us/ex...in=HP005204211

    It is kind of hard to work from a picture. Am I reading this properly, that not only do we need to figure out a conditional average, but we also need to deal with data in different blocks? I would guess that your "too many arguments" is from trying to build the function around having data in 3 different columns. The first thing I would do with this data is rearrange it so it is all in one column (or row) rather than discrete "blocks".

  7. #7
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Averaging formula assistance

    Here is a text example of what i am looking for. I am looking to apply this formula to one row at a time.
    A1 B1 C1 D1 E1 F1 G1 AVG
    Air Conditioner $119.00 y $119.00 y $109.00 n

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Averaging formula assistance

    Then, instead of using helper columns to the right of each data point, use a helper row below the desired data:

    Air conditioner -- 119 -- 119 --- 119
    include in ave -- y --- y --- y

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

    Re: Averaging formula assistance

    Some examples:


    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    1
    Values
    Include
    Average
    15,20,17,18,55,14,12
    2
    15
    y
    16.00000
    =SUMIF(B2:B8,"y",A2:A8)/COUNTIF(B2:B8,"y")
    3
    20
    y
    21.57142857
    =AVERAGE(A2:A8)
    15,20,17,18,55,14,12
    15
    20
    17
    18
    55
    14
    12
    4
    17
    y
    16.00000
    =SUMPRODUCT(--($B$2:$B$8="y"),(A2:A8))/SUMPRODUCT(--($B$2:$B$8="y"))
    16
    y
    y
    y
    y
    n
    y
    y
    =SUMIF(G4:m4,"y",g3:m3)/COUNTIF(g4:m4,"y")
    5
    18
    y
    6
    55
    n
    7
    14
    y
    8
    12
    y

+ 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] Need Averaging Formula
    By geddes_3 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-23-2014, 01:03 PM
  2. need a formula for averaging
    By jfhenry in forum Excel General
    Replies: 2
    Last Post: 07-01-2011, 03:43 PM
  3. averaging formula
    By dandavis1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-02-2008, 11:47 AM
  4. averaging calls per hour formula assistance
    By iggyfalk in forum Excel General
    Replies: 2
    Last Post: 07-29-2008, 11:18 AM
  5. Averaging Formula
    By AllyUK71 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2007, 06:27 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