+ Reply to Thread
Results 1 to 8 of 8

Modify 2 formulas, Merge two formulas into one formula

  1. #1
    Forum Contributor
    Join Date
    04-22-2011
    Location
    Isabela, Puerto Rico
    MS-Off Ver
    365 Mac Excel Version 16.54
    Posts
    233

    Modify 2 formulas, Merge two formulas into one formula

    Please, may someone can help me to modify this formulas and merge them into one formula that behave one way or the other as needed depending on the conditions if it's possible.

    I have this 1st formula to sum the 2 larges values or sum and deduct half of the 2nd large value if H13=Int. and if H13 is not =Int. then sum the two largest values:

    =IF($H$13="Int.",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)/2),IF($H$13="",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)),""))

    I have this 2nd formula to sum the 2 larges values and if H13=Int. eliminates the 2nd large value and return just the larger value and if H13 is not =Int. then sum the two larges values:

    =IF($H$13="Int.",MAX($L$18:$L$29),SUM(LARGE($L$18:$L$29,{1,2})))

    What i triyng to do is to make just one formula that behave one way or the other as needed depending on the condition (situation) if R2=Priority and H13=Int. to return the 2nd formula value and if R2 is blank cell (non priority situation) return the first formula value, just want the formula to return the desire value if the int. happen under priority situation or non priority situation (blank cell)

    Any help is greatly appreciated, many thanks in advance

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Modify 2 formulas, Merge two formulas into one formula

    I'm not clear on the details of your question. Can you upload a representative sample Excel workbook.
    Last edited by FlameRetired; 01-08-2015 at 08:44 PM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Modify 2 formulas, Merge two formulas into one formula

    =IF($H$13="Int.",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)/2),IF($H$13="",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)),""))
    =IF($H$13="Int.", MAX($L$18:$L$29),SUM(LARGE($L$18:$L$29,{1,2})))

    It looks like no matter what you do, you use teh largest value, so....

    =MAX($L$18:$L$29)+ LARGE($L$18:$L$29,2)*IF($H$13="Int.",0.5,1)

    However, like FT, I am unclear on how you want to incorporate that 2nd formula? It looks pretty much based on teh same H13 contents?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    04-22-2011
    Location
    Isabela, Puerto Rico
    MS-Off Ver
    365 Mac Excel Version 16.54
    Posts
    233

    Re: Modify 2 formulas, Merge two formulas into one formula

    Thank you FlameRetired attached the workbook sample, i have the formulas on E14 and E15 and when R2=Priority or a blank cell i been changing to either formula in G14, if you notice there is an * leading the value on G18, this give an interference (Int.) on H13 and O10, one formula (E15)is to use when R2=Priority and the other formula in E14 is to use when R2 is blank, if you remove the * then there is no int. and both formulas sum the 2 largest values, i trying to make just one formula to behave like both, one way or the other depending if R2=Priority or if is a blank cell (Non Pryority).

    Hope this explanations helps. Thanks

    Quote Originally Posted by FlameRetired View Post
    I'm not clear on the details of your question. Can you upload a representative sample Excel workbook.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-22-2011
    Location
    Isabela, Puerto Rico
    MS-Off Ver
    365 Mac Excel Version 16.54
    Posts
    233

    Re: Modify 2 formulas, Merge two formulas into one formula

    Thank you FDibbins, is all based on the content in H13 but depend on whatever R2=Priority or a blank cell, seems like you overlook the detail on R2
    i have the formulas on E14 and E15 and when R2=Priority or a blank cell i been changing to either formula in G14, if you notice there is an * leading the value on G18, this give an interference (Int.) on H13 and O10, one formula (E15)is to use when R2=Priority and the other formula in E14 is to use when R2 is blank, if you remove the * then there is no int. and both formulas sum the 2 largest values, i trying to make just one formula to behave like both, one way or the other depending if R2=Priority or if is a blank cell (Non Pryority). File attached for reference, thanks.
    Quote Originally Posted by FDibbins View Post
    =IF($H$13="Int.",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)/2),IF($H$13="",SUM(LARGE($L$18:$L$29,1),LARGE($L$18:$L$29,2)),""))
    =IF($H$13="Int.", MAX($L$18:$L$29),SUM(LARGE($L$18:$L$29,{1,2})))

    It looks like no matter what you do, you use teh largest value, so....

    =MAX($L$18:$L$29)+ LARGE($L$18:$L$29,2)*IF($H$13="Int.",0.5,1)

    However, like FT, I am unclear on how you want to incorporate that 2nd formula? It looks pretty much based on teh same H13 contents?
    Attached Files Attached Files

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Modify 2 formulas, Merge two formulas into one formula

    I'm still not sure I understand but I'll start with this in cell E16:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The file is attached.

    Does this do what you want?
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    04-22-2011
    Location
    Isabela, Puerto Rico
    MS-Off Ver
    365 Mac Excel Version 16.54
    Posts
    233

    Re: Modify 2 formulas, Merge two formulas into one formula

    Stoked, way to go FlameRetired, it does what i looking for. Thank you!! for taking the time and help with this. Cheers!!! so stoked.

    Quote Originally Posted by FlameRetired View Post
    I'm still not sure I understand but I'll start with this in cell E16:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The file is attached.

    Does this do what you want?

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Modify 2 formulas, Merge two formulas into one formula

    So glad it works! Thanks for the rep!

+ 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. [SOLVED] Modify macro to remove formulas
    By Prithviraj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2013, 07:59 AM
  2. Need to modify 2 complex formulas using IF, THEN, ElSE
    By daymaker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2011, 07:24 AM
  3. Modify Sumproduct & Sumif Formulas
    By Tommy1005 in forum Excel General
    Replies: 12
    Last Post: 01-13-2011, 10:51 AM
  4. Modify Code to copy only value not formulas
    By xned in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-08-2009, 11:21 PM
  5. Modify Formulas
    By mikeg0359 in forum Excel General
    Replies: 2
    Last Post: 01-06-2005, 08:47 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