+ Reply to Thread
Results 1 to 6 of 6

Formula with two equations

  1. #1
    Forum Contributor
    Join Date
    01-09-2009
    Location
    NJ/NY
    MS-Off Ver
    Excel 2007 & 2016
    Posts
    124

    Formula with two equations

    I’m trying to write a formula which contains two equations. One equation is used for all females and all males under the age of 15; the other is used just for all males ages 15 and over. The equations are entered in cells B10 and B11 on the attached sheet (DLCO-help.xlsx). The data used in these equations are entered into cells B4 and B5. I have tried separate functions for each equation (in A13 and A14), and these work, but when I combine them (A15) I get a FALSE result. It works for males and females ages < 15, but for males and females > 15, the result is FALSE. Cells A17:A19 are variations I’ve tried. Once I get this working, this formula is to go into cell G5.

    I’ll bet it’s pretty simple; I think I burnt myself out for today with the formula in cell E4…

    Thank you.

    DLCO-help.xlsx
    Last edited by OverKnight; 02-19-2014 at 05:34 PM.

  2. #2
    Forum Contributor
    Join Date
    01-09-2009
    Location
    NJ/NY
    MS-Off Ver
    Excel 2007 & 2016
    Posts
    124

    Re: Formula with two equations

    I’ll try to rephrase this…
    I’m trying to write a formula which contains two equations.
    Equation #1: (B6*(10.22+B7)/(1.7*B7)) used for males age 15 and over
    Equation #2: (B6*(9.38+B7)/(1.7*B7)) used for all females and for males under age 15

    These equations use the data in cells B6 and B7 in their calculations. Cells B4 and B5 are used to determine which equation to use.

    I’m having difficulty with the correct syntax. This is what I’ve tried:
    IF(B5="Male",IF(B4>=15,(B6*(10.22+B7)/(1.7*B7)),(B6*(9.38+B7)/(1.7*B7)))) returns FALSE with female
    IF(B5="Female",IF(B4<15,(B6*(9.38+B7)/(1.7*B7)),(B6*(10.22+B7)/(1.7*B7)))) returns FALSE with male
    IF(B5="Male",(B6*(10.22+B7)/(1.7*B7)),IF(B4<15,(B6*(9.38+B7)/(1.7*B7)))) returns FALSE with ages 15 and over

    Can anyone assist with this?

    Thanks again.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula with two equations

    Almost with the first try...

    Try IF(AND(Male, >=15),do this, do that)

    IF(AND(B5="Male",B4>=15),B6*(10.22+B7)/(1.7*B7),B6*(9.38+B7)/(1.7*B7))

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula with two equations

    Another way

    =B6*(9.38+(0.84*(B5="Male")*(B4>=15))+B7)/(1.7*B7)

  5. #5
    Forum Contributor
    Join Date
    01-09-2009
    Location
    NJ/NY
    MS-Off Ver
    Excel 2007 & 2016
    Posts
    124

    Re: Formula with two equations

    Thanks very much, Jonmo - I knew it was something simple. I lost most cognitive function around 1:30 PM today...

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula with two equations

    You're welcome.

+ 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. Vlookup & Formula with Multiple Math Equations?
    By maverickballa24 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-19-2013, 04:23 PM
  2. Rotating equations using choose formula over muli cells...
    By Glh222 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2012, 08:18 PM
  3. Excel 2008 : Lookup Equations
    By a_rose in forum Excel General
    Replies: 1
    Last Post: 04-18-2011, 12:57 PM
  4. solving equations
    By hmasenger in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2011, 10:56 AM
  5. how to use dates in equations
    By mufan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2008, 07:55 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