+ Reply to Thread
Results 1 to 3 of 3

Array formulas in excel

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    25

    Array formulas in excel

    Hi, I have 20000 array formulas in an excel sheet. {=SUM(IF(C4:C25000=C4,IF(E4:E25000=E4,AA4:AA25000, ""), ""))}

    I am using vba to refesh the columns. Range("A:C").calculate

    This takes 8 mins to calculate them. Is there an easy way to either enter and calculate the formula through vba or calculate it through vba which is much quicker?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Array formulas in excel

    =SUMproduct(--(C4:C25000=C4),--(E4:E25000=E4),AA4:AA25000) may be marginally faster
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,375

    Re: Array formulas in excel

    You could maybe use a Helper column and concatenate columns C and E, for example, =C4&"|"&E4 and copy down. Then use:

    =SUMIF(Helper Column, C4&"|"&E4, AA4:AA25000)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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