+ Reply to Thread
Results 1 to 3 of 3

Long long formula not calc'ing all steps

  1. #1
    Registered User
    Join Date
    09-23-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    8

    Long long formula not calc'ing all steps

    I have a very very very long formula in which I'm getting no errors, but the calculations aren't all being done. I'm not sure if I need to move or add parentheses. Below is the formula. Does anyone see why the bold parts of the formula aren't working?

    =((IF(J$4-$D5<365.25,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A8),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784))*0.0192,IF(J$4-$D5<3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A8),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784))*0.0385,IF(J$4-$D5>=3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A8),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0577)))))*AND(IF(J$4-$D5>0,((IF(J$4-$D5<365.25,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A8),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0192),IF(J$4-$D5<3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A23),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0385),IF(J$4-$D5>=3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A23),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784))*0.0577,0)))))))*AND(IF(J$4-$E5<0,((IF(J$4-$D5<365.25,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A23),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0192),IF(J$4-$D5<3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A23),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0385),IF(J$4-$D5>=3653,(SUMPRODUCT(--(A!$A$2:$A$4784=B!$A30),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*0.0577),0)))))))+H5-J5)

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Long long formula not calc'ing all steps

    Kind of confusing, yes!

    If you are using the Same Sumproduct() for all conditions and only the multiplier is differenct, then put the Sumproduct before the IF() and then * between, and the AND() function comes before the conditions and gets enclosed in brackets with conditions separated by commas...

    e.g.

    =SUMPRODUCT(--(A!$A$2:$A$4784=B!$A8),--(A!$B$2:$B$4784=B!J$4),A!$Q$2:$Q$4784)*IF(J$4-$D5<365.25,0.0192,IF(AND(...,...),....,IF(....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Long long formula not calc'ing all steps

    [removed - irrelevant]

+ 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