+ Reply to Thread
Results 1 to 9 of 9

need a nested if/and formula for a single cell sorted out - semi complex but beyond me

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    High Desert, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    The spreadsheet must remain on one sheet. Cells, f3,f4,f5,and f6 are all for input purposes. The formula in cell f 8 is currently =(((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30 and works perfectly in most cases. However, I need it to modify it's behavior under certain cases. Case 1: If f3=15 or less AND f5=22 or less, then f8 should display "FREE". Case2= Any time that f8 would return 0 or less (a negative number), f8 should display "FREE". No other cells are available for calculations, so all trickery must be preformed within cell f8.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    =IF(F3<=15;IF(F5<=22,"Free"),(((F3/12)*2)*F6)+(((F4*60)+F5)*0,84)-30)

    Azumi

  3. #3
    Registered User
    Join Date
    03-21-2012
    Location
    Bay Area, California
    MS-Off Ver
    Excel 2011 & 2010
    Posts
    52

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    try this
    =IF(AND(F3<=15,F2<=22),"FREE",IF(((((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30)<1,"FREE",(((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30))

    HTH =)

  4. #4
    Registered User
    Join Date
    02-14-2012
    Location
    High Desert, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Quote Originally Posted by NU2vba View Post
    try this
    =IF(AND(F3<=15,F2<=22),"FREE",IF(((((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30)<1,"FREE",(((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30))

    HTH =)

    I am going to guess that the HTH =) means hope that helps or something. I tried the formula, it does not work correctly. If for example, I put in 16 in f3 and 25 in f5, in returns "FREE" in f8. That should occur only If f3=<15 AND f5=<22.

    I should also have mentioned this is Excel 2010

  5. #5
    Registered User
    Join Date
    02-14-2012
    Location
    High Desert, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Quote Originally Posted by NU2vba View Post
    try this
    =IF(AND(F3<=15,F2<=22),"FREE",IF(((((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30)<1,"FREE",(((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30))

    HTH =)
    Thanks azumi, and thanks NU2vba for your efforts. NU2vba, I find your formula does the same as azui's, namely that if I put in 16 in f3 and 25 in f5, in returns "FREE" in f8. That should occur only If f3=<15 AND f5=<22.

    I should also have mentioned this is Excel 2010

  6. #6
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Try this:
    Please Login or Register  to view this content.
    Click (*) if you received helpful response.

    Regards,
    David

  7. #7
    Registered User
    Join Date
    03-21-2012
    Location
    Bay Area, California
    MS-Off Ver
    Excel 2011 & 2010
    Posts
    52

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Quote Originally Posted by NU2vba View Post
    try this
    =IF(AND(F3<=15,F2<=22),"FREE",IF(((((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30)<1,"FREE",(((F3/12)*2)*F6)+(((F4*60)+F5)*0.84)-30))

    HTH =)
    Small correction to cell reference in formula- F2<=22 should read F5<=22

  8. #8
    Registered User
    Join Date
    02-14-2012
    Location
    High Desert, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Well, getting closer. on this one if f3=16 and f7=24, then f8=Free. However. one of the conditions needed is that to indicate "free", f3 eeded to be 15 or less AND f5 had to be 22 or less.

    Neither of those 2 conditions was met in this example, yet "Free" is still the result.

    Nice try, and thank you for the effort SDCh.

  9. #9
    Registered User
    Join Date
    02-14-2012
    Location
    High Desert, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: need a nested if/and formula for a single cell sorted out - semi complex but beyond me

    Quote Originally Posted by NU2vba View Post
    Small correction to cell reference in formula- F2<=22 should read F5<=22
    Well, I changed that, but found it behaved pretty much like the solution SDCh offered, namely that:

    if f3=16 and f7=23, then f8=Free. However. one of the conditions needed is that to indicate "free", f3 eeded to be 15 or less AND f5 had to be 22 or less.

    Neither of those 2 conditions was met in this example, yet "Free" is still the result.

    Again NU2vba, thank you for trying.

+ 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. Help needed top break the complex nested if formula
    By chandra 2185 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2013, 02:50 PM
  2. [SOLVED] Nested formula required for two cell inputs and a single cell output
    By titch2k6 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-08-2013, 08:11 PM
  3. Replies: 6
    Last Post: 02-06-2013, 07:45 PM
  4. Complex nested array formula problem and challenge
    By PeterWilliams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2007, 10:34 PM
  5. semi-complicated nested IF statement
    By tjb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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