+ Reply to Thread
Results 1 to 8 of 8

Indirect and Sumproduct functions?

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    5

    Indirect and Sumproduct functions?

    Please help, I've been at this for a full day now.

    There are three columns: A, B, and C. The data in A are number inputted manually. I want column B to sum up the numbers in column A. Here's the catch, I want the value in B to reset once data is entered in Column C. The data in column C will be entered sporadically.

    From the hours spent searching i've managed to find someone with a somewhat similar problem. Only, I can't make heads or tails of the formula, and in any case, its not working for me: sum(indirect("p"&sumproduct(max(($p$8:p9=0)*row($p$8:p9)))+1:p9)))


    What i've got thus far is: =if(not(isblank(c1)),a1, ... )

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Indirect and Sumproduct functions?

    hi steveexcels, welcome to the forum. when u say Column B sums up the numberS, it sums every row of Column A? So if A1:A10 is filled, B1 to B10 = SUM(A1:A10)? and what does reset do? blank?

    maybe u can upload a sample for us & show us wat u need to show

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    05-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: Indirect and Sumproduct functions?

    Thanks for the reply benishiryo!

    Working on how to figure out how to upload.

    But, yes, I think you've got the right idea. Column A will have a series of numbers from A1:...., I want column B to add the numbers from column A. So B1 would be A1. B2 would be A1+A2. etc. I think the formula for that would be =sum($A$1:A1).

    The problem is this: everytime someone inputs a number in column C, I want the sum function in column B to start over again. For example say in C3 there is a number, I want B3 to then be A3, and not A1+A2+A3. This is the "reset" that I am talking about.

    I've probably confused you more with that "explanation".

  4. #4
    Registered User
    Join Date
    05-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: Indirect and Sumproduct functions?

    Picture 2.png

    Here's a screenshot of what I am trying to accomplish. The middle column "B" was done manually. The "0" in B4 should actually be 144.4 (i.e. 144.4 + 0)

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Indirect and Sumproduct functions?

    ahhh it isnt more confusing, but a screenshot is not very ideal haha. anyways, your explanation gave a clearer picture. but, are u expecting the cells below B3 to be reset too? means B4 is = SUM(A3:A4)? or is it still running from A1?

  6. #6
    Registered User
    Join Date
    05-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: Indirect and Sumproduct functions?

    exactly. I would like B4 = sum (a3:a4). The problem is coming up with a formula that will accomplish this. I would like the B column to be reset everytime there is an entry in column C.

    The following formula seemed to work for a similar situation: sum(indirect("p"&sumproduct(max(($p$8:p9=0)*row($p$8:p9)))+1:p9))). However, in that case the "trigger" to reset the sum formula seemed to be an entry of "0".

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Indirect and Sumproduct functions?

    wow u really had me use up all of my brain cells. hope this works for u. tried on my end & worked

    using the same eg where data starts from A1:A10, put this in B1:
    =SUM(OFFSET($A$1,IF(MAX(ROW($C$1:C1)*($C$1:C1<>""))=0,MAX(ROW($C$1:C1)*($C$1:C1<>"")),MAX(ROW($C$1:C1)*($C$1:C1<>""))-1),0,IF(MAX(ROW($C$1:C1)*($C$1:C1<>""))=0,ROW(),ROW()-MAX(ROW($C$1:C1)*($C$1:C1<>""))+1)))

    this is an array formula, so press CTRL + SHIFT + ENTER when in the formula

    let me know if it works

  8. #8
    Registered User
    Join Date
    05-24-2012
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: Indirect and Sumproduct functions?

    Benishiryo you are my hero, man!

    I really owe you one. Now I must figure out whats going in that formula. But that can wait for another day!

+ 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