+ Reply to Thread
Results 1 to 8 of 8

Finding Average with few conditions

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Thumbs up Finding Average with few conditions

    Dear Friends,

    I am using EXCEL 2003. I am to find Average using few conditions. I have explained the requirement in the sample workbook.

    Please give me a solution.

    Thanks in advance.

    acsishere.
    Attached Files Attached Files
    Last edited by acsishere; 11-20-2009 at 05:50 PM.
    Good friends are hard to find, harder to leave, and impossible to forget.

    acsishere.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Finding Average with few conditions

    In array terms, using say a range of 2:100

    Please Login or Register  to view this content.
    but the above is expensive, requires error handler, and it looks like you intend to paste across a matrix...

    If it were my file...

    Please Login or Register  to view this content.
    Then

    Please Login or Register  to view this content.
    which will be more efficient... a PT may be viable - it's not really clear based on your sample data set.

  3. #3
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Re: Finding Average with few conditions

    Dear Sir,

    Thanks for your quick reply. It's working nicely. Is it require to use one more column in Col I. Besides, Though it is working nicely when applied, the Lookup is confusing me how it is used.

    Is there any possibility to find without creating one more column, Sir?

    Can you suggest me?

    Thanks in advance.

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Finding Average with few conditions

    DonkeyOte's first formula will do the trick without another column. It just might be significantly slower than his second solution if you have a large array.

  5. #5
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Re: Finding Average with few conditions

    Dear Sir,

    I too agree. If there is no other solution, then I would prefer to choose second option.

    Is there any other possibility without inserting another column, for more than 10000 rows. Already my file size is more than 9 MB. I don't want increase it's size and the file is already very slow in it's calculations. That's the reason I am asking for any other solution without inserting a column.

    Any possibility?

    Thanks in advance.

  6. #6
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Finding Average with few conditions

    Modifying DonkeyOte's first formula, you could do
    Please Login or Register  to view this content.
    but I'm not sure if that's going to be any quicker.

  7. #7
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    584

    Re: Finding Average with few conditions

    Dear Sir,

    Thank you. That's also working.

    Thanks a lot for you both for your efforts.

    acsishere.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Finding Average with few conditions

    As Darkyam inferred, a two SUMPRODUCT approach is likely to perform poorer than a single AVERAGE Array.

    Arrays and SUMPRODUCT are processed the same way - there is little (if any) performance gain using Sumproduct over an Array - the benefit of the former over the latter is more to do with end-user not being required to use CSE.
    It follows then that using 2 SUMPRODUCTs is invariably going to perform poorer than 1 Average Array.

    Regardless of the above do not make the mistake of associating quantity of calculations with efficiency.

    A 1000 Non Array formulas are invariably going to perform significantly (and I mean significantly) more efficiently than a few hundred Arrays, it all boils down to the way the calcs are processed and the overheads.
    Oddly, just today I helped a user elsewhere replace a number of SUMPRODUCTs with SUMIF utilising concatenation helpers and in doing so they found calculation performance improved threefold (in a 50MB file) - ie more formulae can certainly lead to better performance.

    So to surmise, I can't emphasise enough just how bad an idea I believe adopting the single cell approach to be in this instance based simply on the volume of calcs being performed.

    In all honesty I would not be surprised to see you back complaining of crippling performance issues in the near future
    Last edited by DonkeyOte; 11-20-2009 at 06:12 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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