+ Reply to Thread
Results 1 to 11 of 11

SUMPRODUCT Formula is not working and I cant see what is wrong with it

  1. #1
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Hi all,

    Have been staring at this formula now for hours and I can not see what I have done wrong. Have attached the spreadsheet with further explanation.

    Is anyone able to help with how I correct this, it is driving me nuts!

    Thanks guys

    Kate
    Attached Files Attached Files
    Last edited by necht_angel; 11-19-2013 at 10:32 AM.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    what's all that stuff in row 39 or so supposed to be referring to?

    I mean,
    the boolean test in the SUMPRODUCT is returning
    0 - range_elements > 0
    which is FALSE for all range_elements since they're a date array.

    I don't think there are any problems with the formula, but...
    right now, it's, like,
    SUMPRODUCT(all_zeros) * 1-0 * 1-0 * 1+0 - SUM(all_zeros)

  3. #3
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Ah rubbish, sorry, as I had to copy and paste the formula from a bigger spreadsheet I haven't changed all the 39's to 13's. Sorry all 39 should read 13, but it still doesn't work!

  4. #4
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Have updated the spreadsheet with correct line references! Thanks for pointing that out :-)

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    K4 = K11

    L4 = K4 +1
    M4 = L4 +1
    etc

    G13 = 5

    So the boolean test
    $K$11 - $K$4:$ER$4 > $G13

    will assess as somthing like:
    1 - 1:100 > 5

    So that's not going to deliver TRUE ever, because it's going negative.

    Assume you switch them:
    1:100 - 1 > 5

    That's not going to deliver TRUE until column Q; every term left of that will be multiplied by zero, not 1.



    Also,
    That SUM(start:right) term in the end, I don't think that's what you want, because it will subtract the 1st term n times, the 2nd term n-1 times, etc, up to the nth position it's at. I don't think you want that kind of polynomial behavior; I think you just want to subtract the cell to the right.
    Last edited by ben_hensel; 11-19-2013 at 09:52 AM. Reason: noticed something else

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Hi,

    Even changing the row to 13, that still doesn't change the fact that none of your conditions in the SUMPRODUCT is TRUE.

    For example, taking the formula in P13, you are asking the SUMPRODUCT to sum over a range where the following condition(s) are TRUE:

    ($K$11-$K$4:$ER$4)>$G13

    i.e. which of the dates in K4:ER4, when subtracted from the date in K4, produce a value which is greater than the value in G13?

    However, since none of the dates in that range (22-Nov-13, 23-Nov-13, 24-Nov-13, 25-Nov-13, 26-Nov-13, 27-Nov-13, 28-Nov-13 - plus a string of blanks) are greater than that in K11 (22-Nov-13) this part of your formula will only evaluate to a string of FALSEs.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Hi Ben,

    Thanks for your reply. Sorry I'm a bit confused. I didn't write the original formula I have reused it from a previous version of the spreadsheet, and I am not very knowledgable when it comes to writing them, so I don't really understand what you have said... sorry!

    If it is not going to give me the result I want, would you know how to re-write it to achieve what I want?

  8. #8
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    ...In that case,

    I think it would be better to take a step back and ask,

    "what do you want it to do???"

  9. #9
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    I want the figure in K6, after the payment due days in G6 (which is 5 in this case), to arrive in row 13, 5 days later, less the 5% in d13, 2.5% in e13, add the 20% in f13, so basically arrive in cell p13 as the figure 111.00

    Basically I am putting on the invoices in the top lot of rows, and in the rows underneath based on payment days and discounts want the cash amount to drop in when it's due :-/ is that even possible then?

    ahhh, so confusing!

  10. #10
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    So really, you want TWO different operations:

    1) Determine which row to operate on based on the date

    2) Operate on them based on the percentages

    We'll do (1) using some INDEX(output_array, MATCH(current_date - days, date_range, 0)) ; once you got that, it's practically trivial to do (2).

    I also wrapped an IF to handle errors as zero, rather than throwing errors.

    Result:
    Please Login or Register  to view this content.
    pull across
    P13 = 111.15
    Q13 = 555.75

    ...
    This is just my opinion, but the way you've got this layed out looks really strange to me. I dunno how you're using it, but if I was you, I would think about re-organizing.

  11. #11
    Registered User
    Join Date
    09-21-2011
    Location
    London
    MS-Off Ver
    365
    Posts
    71

    Re: SUMPRODUCT Formula is not working and I cant see what is wrong with it

    Hi Ben, that actually works pretty perfect. Thank you so much.

    The layout is not the final layout, it's just a sample from a much bigger sheet.

    Your a star :-)

    Kate

+ 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 formula not working
    By cartica in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-20-2013, 11:19 AM
  2. What's Wrong with my sumproduct Formula?
    By Rwilliams_09 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-23-2013, 11:38 AM
  3. SUMPRODUCT formula not working
    By KINNEY0201 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-28-2010, 12:26 PM
  4. SumProduct Formula not working
    By jfwidt in forum Excel General
    Replies: 6
    Last Post: 02-03-2010, 05:18 PM
  5. Replies: 7
    Last Post: 02-10-2009, 10:44 AM

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