+ Reply to Thread
Results 1 to 20 of 20

Need help with average formula

Hybrid View

  1. #1
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Need help with average formula

    I need some help formatting an "average" formula for excel 2010 please

    I have 3 rows (B8 to M8, B9 to M9 and B10 to M10) for the months of the year that I need to get an average for. There are 36 cells that may or may not have dollar amounts in them and I need to get an average for all those cells that have dollar amounts in them. So if 25 cells have figures in them I need the average for those 25 cells not all 36. Cells may have 20 of them with dollar amounts or 32 etc. so the average needs to be calculated without the empty cells. How do it accomplish this?
    Thanks in advance for any help.
    Gene
    Last edited by genestoy; 11-16-2016 at 10:36 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,925

    Re: Need help with average formula

    According to its help page, "If a range or cell reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included", so you could use:
    Formula: copy to clipboard
    =AVERAGE(B8:M10)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Sorry that does not work for me

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,925

    Re: Need help with average formula

    Her is my interpretation of the spreadsheet you are describing.
    The Average function is populating P7 and a table of sums and counts in N8:O10 feeds the check in P9.
    You may also want to upload a sample of your spreadsheet. To attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Maybe I explained it wrong - I have a total of 36 cells B8 to M8, B9 to M9 and B10 to M10 (some cells will be blank) I need the average of all cells that have dollar amounts and then divided by the number of months at present. So the total of all cells dollar amounts divided by 10 for the end of October, 11 for November etc.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,925

    Re: Need help with average formula

    The attached modification to the earlier spreadsheet uses the following formula in P10 to average the range up through the month displayed in P9:
    Formula: copy to clipboard
    =AVERAGE(INDIRECT("B8:"&ADDRESS(10,MATCH(P9,B7:M7,0)+1)))
    Let us know if you have any questions.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    That did not work either but I found a "workaround"

    I entered these 3 formulas in blank cells in the "O" column to get the average of each row
    =IFERROR(AVERAGE(B4:M4),"")
    =IFERROR(AVERAGE(B5:M5),"")
    =IFERROR(AVERAGE(B6:M6),"")
    Then I entered the code below in the "N" cell I needed the average total for the all the months entered so far
    =SUM(O4,O5,O6)
    The "N" cell now shows the correct average for all months entered so far and changes as more figures are entered in remaining months

    Thanks for trying anyway it is appreciated, I just though there may be a single formula for the "N" cell to accomplish this.

    Gene
    Last edited by genestoy; 11-17-2016 at 11:16 AM.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,925

    Re: Need help with average formula

    Glad that you got a solution that works. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,806

    Re: Need help with average formula

    I am not sure if this is correct mathematically as we still don't what is the three rows i.e are they the same "criterion" ?: but SUMming the averages is not the same as averaging all 36 assuming all 12 months were completed (or portion of).

  10. #10
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    I have 3 cells for each month with dollar amounts in each cell (some may be blank)
    All months entered need to be averaged, not just 1 of the cells
    10.00   20.00  30.00  40.00 etc
    15.00   25.00  35.00  45.00 etc
            10.00          5.00 etc (many are blank on the third row)
    
    25.00   55.00  65.00  90.00 totals
    
                         58.75 average (235.00 divided by 4 months)
    Last edited by genestoy; 11-17-2016 at 12:54 PM.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,806

    Re: Need help with average formula

    You cannot have an average > than the maximum individual reading (45 in the data above): the average of those reading over 4 months is 235/10 (there are 10 readings).

    JeteMc formula gave you the correct answer.

  12. #12
    Registered User
    Join Date
    11-17-2016
    Location
    Texas
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Need help with average formula

    Try This
    =(AVERAGE(B4:M4,B6:M6,B8:M8))/(MONTH(DATEVALUE(C2&" 1")))

    AVERAGE(B4:M4,B6:M6,B8:M8) averages the lines you wanted
    MONTH(DATEVALUE(C2&" 1")) converts the months name to the months number
    I Put the month into cell C2
    You could use a hard number for the month or just use a number depending on hour your spreadsheet is set-up
    The overall formula should achieve what you were looking for

    I'm a rookie with excel but this should work
    Last edited by Ihsienak; 11-17-2016 at 05:25 PM.

  13. #13
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Don't know what you mean here "I Put the month into cell C2"? Is this only going to do 1 month or all months?
    thanks

  14. #14
    Registered User
    Join Date
    11-17-2016
    Location
    Texas
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Need help with average formula

    When i did my example testing i put " October" into Cell C2
    The formula converted that to 10 and then divided the average of the cells by 10
    If i put April into Cell C2 it divided the average by 4

  15. #15
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Sorry but
    =(AVERAGE(B7:M7,B8:M8,B9:M9))/(MONTH(DATEVALUE(B2&" 1")))
    returns about half of the actual average (changed the formula to my spreadsheet rows) If I change the B2 (Jan) to C2 (Feb) the result gets smaller and D2 (Mar) gets even smaller results
    Gene
    Last edited by genestoy; 11-17-2016 at 06:58 PM.

  16. #16
    Registered User
    Join Date
    11-17-2016
    Location
    Texas
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Need help with average formula

    ok
    i misunderstood the question
    I thought you wanted to divide the average by the month
    if you use just the first part it will give the average
    =AVERAGE(B4:M4,B6:M6,B8:M8)

    Mike

  17. #17
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Still returns only half of what it should be, guess there is no way to do this but my way of the extra cells to calculate it does work so will stick with that. Thanks for trying everyone.

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,806

    Re: Need help with average formula

    my way of the extra cells to calculate it does work
    sorry but it is mathematically incorrect.

    What is in column A of these 3 rows?

  19. #19
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    Name of sheet & year (in row 1)
    Months Jan to Dec (in row 2)
    Payee A (in row 3)
    Payee A (in row 4)
    Payee A (in row 5) this row usually has nothing in any of the cells but can in some months
    blank row
    Payee B (in row 7)
    Payee B (in row 8)
    Payee B (in row 9) this row usually has nothing in any of the cells but can in some months

  20. #20
    Registered User
    Join Date
    07-20-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Need help with average formula

    John, you are correct when the sheet has the three rows, it does not work. I have now deleted the third row and now it does work just fine. I will continue with the two rows--
    Name of sheet & year (in row 1)
    Months Jan to Dec (in row 2)
    Payee A (in row 3)
    Payee A (in row 4)
    blank row
    Payee B (in row 6)
    Payee B (in row 7)

+ 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] Index, Match formula returns #NA error if result is from an average formula.
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2016, 11:43 AM
  2. [SOLVED] Using the Average formula in VBA gives different results to worksheet Average formula
    By Sc0ut in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-06-2016, 06:02 AM
  3. [SOLVED] Average formula that shows 0 but does not count in average
    By Lewster in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-11-2015, 04:49 PM
  4. [SOLVED] Rank numbers by average with doing average formula
    By makinmomb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-26-2014, 11:58 PM
  5. [SOLVED] need formula to average cells but if one cell has N/A then dont average and input N/A
    By CityInspector in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 04:16 PM
  6. Replies: 0
    Last Post: 01-22-2013, 12:22 PM
  7. [SOLVED] how does one convert text to a formula "average(A:A)" to =average(
    By phshirk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-13-2005, 09:06 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