+ Reply to Thread
Results 1 to 5 of 5

error in formula (averageifs)

  1. #1
    Registered User
    Join Date
    11-28-2016
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    20

    error in formula (averageifs)

    Hi, could someone help me please?
    I have written a formula in the excel for the highlighted cell.
    But it seems not correct.
    Could someone let me know how I should correct it please?

    what I want to do in the excel is:
    a date is given: 22 Aug
    how to calculate the next month's average (1 Sep to 31 Sep )?

    Thank you.

    Don't know why I can't attach file here.
    here is the link to google drive.

    https://drive.google.com/open?id=0B4...WV0c0xER0hVQlU

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: error in formula (averageifs)

    hey daniel. the upload attachment must be done by going to Go Advanced. click on Manage Attachments. Choose file, upload and close the window.

    one error in your formula lies here:
    ">="&UC!EOMONTH(H6,0)+1

    the worksheet name should be in front of the cell reference:
    ">="&EOMONTH(UC!C6,0)+1

    Although it is unnecessary here because you don't have to reference a worksheet where the formula is residing in. hence, you can go with:
    =AVERAGEIFS(LME!$C$4:$C$1003,LME!$B$4:$B$1003,">="&EOMONTH(H6,0)+1,LME!$B$4:$B$1003,"<="&EOMONTH(H6,1))

    but the 2nd problem is that cell H6 is empty. maybe it is just a sample file with different references. but if you are referring to 22 Aug, maybe:
    =AVERAGEIFS(LME!$C$4:$C$1003,LME!$B$4:$B$1003,">="&EOMONTH(C6,0)+1,LME!$B$4:$B$1003,"<="&EOMONTH(C6,1))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: error in formula (averageifs)

    Hello,

    This is the formula fragment you posted in your file:

    AVERAGEIFS(LME!$C$4:$C$1003,LME!$B$4:$B$1003,">="&UC!EOMONTH(H6,0)+1,LME!$B$4:$B$1003,"<="&UC!EOMONTH(H6,1))

    The sheet reference "UC!" belongs in front of the cell, not in front of the function. Also, in your sample file, you probably want to refer to C6, not H6, because that is the cell with the date of 22-Aug.

    =AVERAGEIFS(LME!$C$4:$C$1003,LME!$B$4:$B$1003,">="&EOMONTH(UC!C6,0)+1,LME!$B$4:$B$1003,"<="&EOMONTH(UC!C6,1))

    In your sample file, this formula returns the value 6,673.81, which is correct according to your sample data.

  4. #4
    Registered User
    Join Date
    11-28-2016
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    20

    Re: error in formula (averageifs)

    Hi Benishiryo, thanks a lot for your comments. Now i get it.
    also appreciated that you told me how to attach the file.

    it all works fine now.
    thanks again.

  5. #5
    Registered User
    Join Date
    11-28-2016
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    20

    Re: error in formula (averageifs)

    Hi Teylyn,

    thanks a lot for the corrected formula.
    it works now.
    ^^

+ 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. #value error in averageifs formula
    By andrugrasu in forum Excel General
    Replies: 6
    Last Post: 09-10-2017, 03:33 PM
  2. [SOLVED] AverageIFS using indexed % #REF! error
    By davidktilley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2016, 07:58 PM
  3. [SOLVED] Averageifs – error Value
    By pauldaddyadams in forum Excel General
    Replies: 3
    Last Post: 02-05-2016, 11:40 AM
  4. [SOLVED] Value error on Averageifs
    By leem in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2015, 02:55 PM
  5. [SOLVED] Averageifs returning #DIV/0 error
    By kbotta in forum Excel General
    Replies: 8
    Last Post: 10-09-2014, 08:38 AM
  6. DIV/0 error with AVERAGEIFS
    By pcp2010 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-13-2013, 10:01 AM
  7. AverageIFS with Div/0 error
    By Nemoren in forum Excel General
    Replies: 13
    Last Post: 05-03-2012, 09:33 AM

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