+ Reply to Thread
Results 1 to 7 of 7

how do I sum the product of two non-adjacent rows?

  1. #1
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    how do I sum the product of two non-adjacent rows?

    I wish to do a summation of the product of two sets of parallel cells, said cells separated by other rows.

    The seemingly simple solution of sum of the start pair of cells - the end pair of cells, or sumproduct, just turns the function into an array.

    Am I perhaps asking the impossible, or is there some way to do this?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: how do I sum the product of two non-adjacent rows?

    You didnt explain what you are trying to do in your file.

  3. #3
    Registered User
    Join Date
    03-26-2015
    Location
    Sofia, Bulgaria
    MS-Off Ver
    2019
    Posts
    8

    Re: how do I sum the product of two non-adjacent rows?

    I didn't quite get you but adding condition to a SUMPRODUCT is perfectly possible (no array formula needed). Double negatives convert true/false to 1/0, which can be then used in the sumproduct.

    In the attached example I am sumproduct-ing 2 columns for all days but Sundays.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    --
    TG|ЕS

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: how do I sum the product of two non-adjacent rows?

    try adding using straight =c3+i3, instead of using the sum formula, I hope I understood your question.

  5. #5
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Re: how do I sum the product of two non-adjacent rows?

    Apologies to you all. I was too vague/cryptic.

    What I wish to do is sum the product of each cell in rows 3 to 14 by those in row24 along each row in turn and sum those for each row, but whilst I can an individual product (such as =B16*B24 =-0.05281886), I cannot find a way to both do that with each pair from Col.B to Col.N and sum that lot.

    I eventually wish to do this with all the rows, putting the results in Col.P

    I hope that clarifies the problem.

    I post an updated spreadsheet.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: how do I sum the product of two non-adjacent rows?

    I'm not sure if I'm following you or not, but what about putting this formula in P3 and copying it down:

    =SUMPRODUCT(B3:N3,$B$24:$N$24)

  7. #7
    Forum Contributor
    Join Date
    08-06-2012
    Location
    Brighton, UK
    MS-Off Ver
    MS Office 2021 and 2019
    Posts
    112

    Re: how do I sum the product of two non-adjacent rows?

    Many thanks for this solution, and staying with me in my stumbling presentation.

    This way of using the function - which may well be how it was always supposed to work - had eluded me.

+ 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. Moving rows adjacent to pivot table rows
    By karlkoloda in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-15-2019, 05:13 PM
  2. Product for Rows based on Attributes in Adjacent Column
    By shouwiz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2018, 05:11 PM
  3. Move Data from rows to adjacent rows if having unique value
    By pintu2222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2017, 09:35 AM
  4. [SOLVED] Repeating adjacent cell against finished good code until next product.
    By hbuzz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-19-2016, 08:03 AM
  5. Insert rows based on count and fill rows with adjacent values
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-19-2015, 02:57 PM
  6. Macro that cuts data from lower rows and pastes them in adjacent rows
    By kehl_4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2014, 02:07 PM
  7. Replies: 2
    Last Post: 04-02-2009, 05:56 AM

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