+ Reply to Thread
Results 1 to 7 of 7

function to count the average, check if not empty, then count

  1. #1
    Registered User
    Join Date
    06-04-2005
    Posts
    32

    function to count the average, check if not empty, then count

    Hi,

    I'm trying to make a tool for my kid to see the average of his marks.
    Like this:

    Capture1.JPG

    The result are in bold in the table, calculated with the following formula:
    =((B22*C22)+(B23*C23))/(C22+C23)
    and
    =((E22*F22)+(E23*F23))/(F22+F23)

    My question is the following: in order to prevent to have to modify the formula everytime I enter a new note, is it possible to ahve it done automatically?
    Like the cell is checking that from row 22, if it different than empty, then it starts to count, then the following one and so on till the first row that is empty.

    Thanks for your answers!

    E

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: function to count the average, check if not empty, then count

    Try in this way...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: function to count the average, check if not empty, then count

    Try this
    For Column B and C

    =SUMPRODUCT(B22:B30*C22:C30)/SUM(C22:C30)
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: function to count the average, check if not empty, then count

    If you had posted a sheet instead of a picture, we would know where row 22 is...

  5. #5
    Registered User
    Join Date
    06-04-2005
    Posts
    32

    Re: function to count the average, check if not empty, then count

    Here is a sample to do it.
    I embedded your solution and naturally it works fine.

    Only, I was wandering whether it possible to do that without have to "fasten" the array:
    Imagine I keep to enter datas, and I go over the array, I have to extend it everytime.
    Isn't it possible to have the function check whether the following cell is empty, and if not, the extend automatically the array?


    marks sample.xlsx

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: function to count the average, check if not empty, then count

    Formula given in my previous post works for your condition.

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: function to count the average, check if not empty, then count

    There are many solutions to your last question
    You can use a longer range like E7:E1000
    You can use Dynamic Ranges
    ........

+ 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] COUNT also counts empty cells in an array function??
    By edward_glyver in forum Excel General
    Replies: 20
    Last Post: 04-25-2016, 11:34 AM
  2. function to count and/or average when data changes daily
    By chavez000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2014, 09:19 PM
  3. [SOLVED] Count and average formula needed to not count text field
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2013, 05:30 PM
  4. Average function to count till current month !!!
    By sonu1975 in forum Excel General
    Replies: 5
    Last Post: 05-11-2012, 07:44 AM
  5. Replies: 2
    Last Post: 01-28-2011, 12:56 PM
  6. using count function with empty cells
    By maacmaac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2010, 04:18 PM
  7. function to count numbers excluding empty cells
    By nickelcell1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2010, 03:10 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