+ Reply to Thread
Results 1 to 11 of 11

Average of calculations on every row in a table?

  1. #1
    Registered User
    Join Date
    05-25-2017
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    17

    Average of calculations on every row in a table?

    Hello. Imagine a table with two columns of data:
    4 1
    8 2
    60 30
    I want to divide each number in Column 2 by the corresponding number in Column 1 and then take the average of those. (Answer should be 0.333.) I've tried
    Please Login or Register  to view this content.
    but that gives me anything from a wrong answer to just the last row to a #VALUE! error. Any ideas? Thanks!
    excelerror.png

  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
    47,995

    Re: Average of calculations on every row in a table?

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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
    05-25-2017
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    17

    Re: Average of calculations on every row in a table?

    Thanks! I'm still getting an error though. It seems to be due to the blank rows in the table. Trying to fix it, but nothing working...
    Attachment 691789

  4. #4
    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
    47,995

    Re: Average of calculations on every row in a table?

    Follow the instructions in the yellow banner to attach a file.

  5. #5
    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
    47,995

    Re: Average of calculations on every row in a table?

    What blank rows? Why have you got blank rows in a Structured Table? What sort of error?

  6. #6
    Registered User
    Join Date
    05-25-2017
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    17

    Re: Average of calculations on every row in a table?

    Yes, my table may have blank rows so I want the formula to handle them properly. It's a #DIV/0! error.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Average of calculations on every row in a table?

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts braces {} around the formula (though do not attempt to manually insert these yourself).
    Ben Van Johnson

  8. #8
    Registered User
    Join Date
    05-25-2017
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    17

    Re: Average of calculations on every row in a table?

    Yes, I managed to get it working with an array formula:
    Please Login or Register  to view this content.
    I don't really understand what's going on or why the behavior was so strange on my previous attempts. I think I need to brush up on my Excel knowledge.

  9. #9
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2502 and WPS V2024(12.1.0.18543)
    Posts
    3,842

    Re: Average of calculations on every row in a table?

    Array formular

    {=AVERAGE(IF((F2:F12<>0)*(D2:D12<>0),F2:F12/D2:D12))}

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Average of calculations on every row in a table?

    Please try array formula

    =AVERAGE(IF(Table1[Entrants],Table1[Result]/Table1[Entrants]))

  11. #11
    Registered User
    Join Date
    05-25-2017
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    17

    Re: Average of calculations on every row in a table?

    Yes that worked and it's cleaner than the SUM one. Thanks all!

+ 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] average some 0's into calculations while ignoring others.
    By chriswrcg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2018, 04:10 PM
  2. [SOLVED] Need help in average calculations
    By migdad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2014, 05:01 AM
  3. Problem with AVERAGE calculations and #DIV/0! display.
    By tizmylife in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-19-2013, 08:51 AM
  4. mean average of 3 calculations
    By bwfc0907 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-14-2008, 06:58 PM
  5. [SOLVED] Average of Multiple Calculations
    By pdberger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2006, 08:55 PM
  6. [SOLVED] Average %age Calculations
    By Jay in forum Excel General
    Replies: 4
    Last Post: 07-28-2006, 05:25 AM
  7. [SOLVED] Monthly average calculations
    By Francois in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2005, 10:06 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