+ Reply to Thread
Results 1 to 7 of 7

SUM/INDEX/SUMPRODUCT array formula

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    SUM/INDEX/SUMPRODUCT array formula

    Hi all,

    I want to use an array formula instead of helper columns and have already done so for the SUM of each column, but now I need to do the same for each row. Though, this includes a SUMPRODUCT calculation and is hence a little more complex.

    The cells colored in red make use of the extra columns I created, whereas the green cells are supposed to be calculated without using any interim calculations. Currently the numbers do not match by row

    The sample file should make things more clear...
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,794

    Re: SUM/INDEX/SUMPRODUCT array formula

    What is the problem with using helper columns? You can easily hide them.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: SUM/INDEX/SUMPRODUCT array formula

    If I add helper columns for everything I do, I wouldn't have enough columns (Yes, I know, there are 16384)

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,794

    Re: SUM/INDEX/SUMPRODUCT array formula

    Put the helper columns on a helper tab. If your data are that large, array formulae are probably not the best way to go, as they have overheads that may make your workbook sluggish.

  5. #5
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: SUM/INDEX/SUMPRODUCT array formula

    There's a bigger story to this, hence helper columns won't work in this case! And as you can see, the 'vertical' array formula in e.g. "D3" works pretty well! Now I just need one to calculate the SUM of each row...

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: SUM/INDEX/SUMPRODUCT array formula

    Perhaps this
    =SUMPRODUCT(INDEX(IA!$A:$AZ,N(IF(D6:H6<>0,IF(ISNUMBER($C6),$C6))),N(IF({1},I$1:$M$1))),$D$2:$H$2)
    array-entered.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  7. #7
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: SUM/INDEX/SUMPRODUCT array formula

    Thanks so much Don! Just tested it intensively on my actual data set and it works just fine!! Don't know how you solve these things so quickly!!

+ 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. SUMPRODUCT array formula doesn't recognize Array 5
    By trstew in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-08-2016, 05:01 PM
  2. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  3. [SOLVED] Need a SUMPRODUCT/SUMIF/INDEX/MATCH array formula. Please Help!!
    By TheClaw2323 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2015, 01:34 PM
  4. [SOLVED] Index/Match to Return 1D array to be used in a sumproduct
    By david0985 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2014, 04:41 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Help! Dual Vlookup function? Sumproduct with index array?
    By thaprofessor33 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-03-2012, 09:08 AM
  7. [SOLVED] SUMPRODUCT as array formula?
    By Henrik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2005, 06:20 PM

Tags for this Thread

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