+ Reply to Thread
Results 1 to 11 of 11

using Averageifs formula with Defined Name Manager

  1. #1
    Registered User
    Join Date
    03-31-2016
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    using Averageifs formula with Defined Name Manager

    Hi there,

    How can you averageifs with sales greater than zero for a specific vendor.

    This formula shows #VALUE! but I believe it's correct.

    i.e. =AVERAGEIFS(SALES,VENDOR_NAME,B4,SALES,">0")

    Any help would be greatly appreciated

    Thank you.

  2. #2
    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,767

    Re: using Averageifs formula with Defined Name Manager

    #Value suggests data problem although AVERAGEIFS deals with many data problems OK.

    SALES/VENDOE_NAME are named range

    Your formula should work so without data it's difficult to give a definite answer.

    Is it possible to post a sample value with data giving error?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: using Averageifs formula with Defined Name Manager

    1. Are the sales really values, and not text looking like values?
    2. Does B4 contain a name that actually exists in your range?
    3. If it looks like the name really is there, check for leading/trailing spaces in both cells (B4 and the other 1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using Averageifs formula with Defined Name Manager

    You can also get a #Value! error if the ranges are not equally dimensioned.

    What is in the 'refers to' box for each named range?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: using Averageifs formula with Defined Name Manager

    Good point Jonmo, didnt think of that

  6. #6
    Registered User
    Join Date
    03-31-2016
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: using Averageifs formula with Defined Name Manager

    Hi everyone,

    I am able to sum and average but not average greater than 0.

    Not sure why the formula is not working...it seems like a simple formula.



    Attachment 453812



    I have attached a sample data.
    Attached Images Attached Images
    Attached Files Attached Files

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using Averageifs formula with Defined Name Manager

    never mind.. incorrect response.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using Averageifs formula with Defined Name Manager

    It's because the ranges are not equal dimensions.

    Sales has 22 rows <- shown by =ROWS(Sales)
    Vendor_Name has 23 rows <- shown by =ROWS(Vendor_Name)

    This is caused by one of the cells (B5) on the Data Sheet in column B that appears to be blank, really isn't blank.
    So it's being counted by the COUNTA function in your named range definition.

    Right click that cell, and clear contents.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using Averageifs formula with Defined Name Manager

    However, a better solution to avoid having to hunt down the one off cell causing an issue with named ranges like that.

    When using dynamic named ranges, I suggest making one name that counts how many rows are in the data set.
    Then use that same one in all of your dynamic named ranges.

    Example
    Create the names
    RwCount: =COUNTA(DATA!$D:$D)-1
    Sales: =OFFSET(DATA!$D$8,,,RwCount)
    Vendor_Name: =OFFSET(DATA!$A$8,,,RwCount)


    This way, if the count is off in RwCount, at least all ranges are still the same dimension
    (better for them both to be too large but the same, than 1 to be correct and the other too large)

  10. #10
    Registered User
    Join Date
    03-31-2016
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: using Averageifs formula with Defined Name Manager

    Hi Jonmo1,

    I selected on cell B5 on the data sheet and cleared the cell, and it automatically populated!! Yay!!!!

    I'm not sure what "equal dimensions" mean, but I will have to figure that out and research it on my own time.

    I have also created the name, "RwCount", and used your formula...and it also worked too!!! Double Yay!!!

    Now I have to wrap my head around and understand the formula.

    I have marked this thread as "Solved"
    and I will Click on the star that you have helped me

    Thank you & have a great day

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: using Averageifs formula with Defined Name Manager

    You're welcome.

    equal dimensions basically means "Same Size and Shape".
    The Same number of Columns AND the same number of Rows.

    Your named range Sales, was 1 column and 22 Rows
    Your named range Vendor_Name was 1 column and 23 Rows

    Those are unequal dimensions.

+ 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. Range defined for a name in Name Manager is keep changing
    By maruthi_ravi in forum Excel General
    Replies: 6
    Last Post: 09-29-2013, 12:50 PM
  2. Averageifs RUn time Error 1004 app-defined
    By lettersofberk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 07:10 AM
  3. Changing the name of a Defined List in Name Manager using VBA?
    By cool1_boy1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2013, 09:43 PM
  4. Application-defined or object-defined error with vba .formula
    By RogerKMiller in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2013, 03:37 PM
  5. [SOLVED] Excel 2007 : Help (again) with AVERAGEIFS formula
    By milliemoo in forum Excel General
    Replies: 9
    Last Post: 03-27-2012, 09:37 AM
  6. Need help averageifs formula
    By lliam79 in forum Excel General
    Replies: 3
    Last Post: 09-23-2011, 02:44 AM
  7. Application-defined or Object-defined error on Formula entry
    By Kaigi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2009, 01:33 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