+ Reply to Thread
Results 1 to 9 of 9

Modify SUM

  1. #1
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Modify SUM

    I have this SUM formula that is working, but I need to add a two more conditions and I can't seem get it right.
    =SUM(IF(L2:L20000="",0,1)*IF(Q2:Q20000="selected",1,0)*IF(LEFT(L2:L20000,1)>RIGHT(L2:L20000,1),1,-1/(I2:I20000-1)))

    I need to add two more conditions to the last IF

    I want the last IF to be true only if H2:H20000 is greater than 1.2, and to be false only if I2:I20000 is greater than 1.2. In any other cases I want it to be 0
    Keep in mind that this is an array formula
    I'm sorry if I explained poorly, if it's too difficult I'll attach an example sheet.




    TY

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Modify SUM

    Is this array formula what you want?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Modify SUM

    Thanks for replying, the your solution is working correctly but it does not have the two conditions that I have mentioned
    the last IF should be true only if H2:H10 is also greater than 1.2 and false only if I2:I10 is also greater than 1.2

    this is my non-array formula that if applied to a whole column and then summed up, gives the result that I'm looking for.
    Please Login or Register  to view this content.
    What I am trying to do is get everything into one cell, with an array formula.

    Sorry for being ambiguous

  4. #4
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Modify SUM

    I've attached an example sheet
    sum is the sum that I am looking for with my newbie solution.
    sum2 is the solution that Ron Coderre suggested
    sum3 is a variant of his solution, same result
    Attached Files Attached Files

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Modify SUM

    Maybe this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is that something you can work with?

  6. #6
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Modify SUM

    I've tested it a bit and it seems to be giving wrong results and I can't really change it as I'm not familiar with the CHOOSE and SIGN functions.

  7. #7
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Modify SUM

    This is an archive of John Isner's past ~150 matches , I'm sure you've heard of him since he's the top ranked US tennis player.
    My formula says that
    IF the F cell is not blank, Q cell is "selected" , the L cell( set score) is positive - (as in he won the match) and the H column is greater then 1.2, then the value is 1

    if not, if the L cell is not blank, Q is selected, the set score is negative (as in he lost the match), and the I cell is greater than 1.2, then value is -1/(i3-1)

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Modify SUM

    How about this array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    08-04-2013
    Location
    Bucharest
    MS-Off Ver
    Office Professional Plus 2019
    Posts
    303

    Re: Modify SUM

    That's spot on, many thanks!

+ 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. Modify IF Formula
    By oskar270 in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 05-16-2013, 04:55 PM
  2. [SOLVED] Is it possible to bypass the pw to modify all wb
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-15-2013, 04:02 PM
  3. How to modify VB code?
    By sem in forum Excel General
    Replies: 3
    Last Post: 08-07-2012, 05:29 AM
  4. Modify a formula
    By Eintsein_mc2 in forum Excel General
    Replies: 3
    Last Post: 09-18-2005, 01:05 AM
  5. Re: Modify this a bit
    By Jay in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2005, 02:06 PM

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