+ Reply to Thread
Results 1 to 10 of 10

Array formula or Sumproduct help

  1. #1
    Registered User
    Join Date
    07-20-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    10

    Array formula or Sumproduct help

    Trying to find an array formula or formula using sumproduct to sum the results of the following in a single cell:

    =(F4/(SUM(F4,G4)))*D4

    for F:F, G:G, D:D

    Basically trying to sum the result of that formula for each row of a dataset. Not great with arrays formulas yet, but I feel like I'm right on the edge of cracking this one. Attached has a "wrong" example of the math, a "right" example of the math, and a test area, where I would want the forumlas to reside in P10 & Q10, calculating the same way as K12 & K13, but without the intermediary step of calculating each line, and obviously to be dynamic for any sized array.

    Thanks in advance.

    -J
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula or Sumproduct help

    Not quite sure I understand precisely what you're getting at but perhaps in P4 and copied to P5:Q5 & P9:Q9
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    07-20-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Array formula or Sumproduct help

    I think I'm misunderstanding your reply as well.

    Basically, the formula above would be happening on every row of the data, for F4:F(n). I need a formula that will sum the totals of each row's result of that formula. Starting to look like sumproduct is the way to go the deeper I get into this one...

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula or Sumproduct help

    Hi,

    Upload the workbook and clearly show which are the results cells and what the results should be - manually add the results.

    SUMPRODUCT formulae are not normally needed these days since they were largely replaced by the more efficient SUMIFS() function with XL2007. However I only see one criteria for grouping in your data so a normal SUMIF should be sufficient.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Array formula or Sumproduct help

    Pl see attached file.
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Array formula or Sumproduct help

    OK You've indicated that P12:Q12 are the two result cells you want but it's not clear which are the data cells.I'll assume columns I:L are the data.

    In P12 copied to Q12
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-20-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Array formula or Sumproduct help

    Quote Originally Posted by kvsrinivasamurthy View Post
    Pl see attached file.
    You sir, are a lifesaver! I must have tried every way of arranging those named ranges into that formula EXCEPT for that. Many thanks.

  8. #8
    Registered User
    Join Date
    07-20-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Array formula or Sumproduct help

    Oh no! Didn't think about the fact that, division on a line by line basis will require taking cells with a value of zero into account. Adding Pn+Qn will sometimes result in a zero. Going to tinker with Richard's solution and the normal regimen of troubleshooting.... as I notice that my thank you message to him does not appear to have sent.

  9. #9
    Registered User
    Join Date
    07-20-2012
    Location
    Phoenix, Arizona
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Array formula or Sumproduct help

    Quote Originally Posted by Richard Buttrey View Post
    OK You've indicated that P12:Q12 are the two result cells you want but it's not clear which are the data cells.I'll assume columns I:L are the data.

    In P12 copied to Q12
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    VillaArrayStudy5.xlsx


    Ok, cleaned it up a bit to identify the three sections more clearly. The Test section is where I'm looking to replicate the results of the "Right Answer" section, without the intermediary calculations. The SUMPRODUCT solution was not viable due to a divide by zero error. Still pounding away at this one but don't understand the way your SUMIF is coming to the answer. Hoping you find a moment to dumb it down for me. Much appreciated.
    Last edited by IbenezPrez; 10-24-2014 at 02:51 PM.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Array formula or Sumproduct help

    Pl see attached file with ARRAY formula.
    Attached Files Attached Files

+ 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 Help
    By Cullen8 in forum Excel General
    Replies: 7
    Last Post: 01-12-2012, 10:57 AM
  2. Sumproduct in vba (formula array)
    By Statsman in forum Excel General
    Replies: 3
    Last Post: 05-07-2009, 03:03 AM
  3. SUMPRODUCT or array formula help please!
    By Cumberland in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-05-2007, 05:26 PM
  4. [SOLVED] SUMPRODUCT as array formula?
    By Henrik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2005, 06:20 PM
  5. SUMPRODUCT as array formula?
    By Henrik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2005, 06:17 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