+ Reply to Thread
Results 1 to 12 of 12

Combine two separate forumulas in one cell with one result

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    ft. lauderdale, fl
    MS-Off Ver
    Excel 2010
    Posts
    16

    Combine two separate forumulas in one cell with one result

    i have been trying to combine two formulas in one cell. separately they work properly but together they produce an error message.

    [=IF(AND(B7="Avgas",E7="yes"),VALUE(D3-0.0171),D3),OR (IF(AND(B7="Jet",E7="yes"),VALUE(D4-0.0171),D4))]

    I'm not sure what to put in between the first formula and second - maybe there's an easier way?

    Please Help
    Last edited by Mosborne1; 09-30-2011 at 04:09 PM.

  2. #2
    Registered User
    Join Date
    09-15-2008
    Location
    Vancouver, Washington
    MS-Off Ver
    2007
    Posts
    11

    Re: Combine two separate forumulas in one cell with one result

    Hi Mosborne1,
    Can you please provide an example document or discuss what it is you are trying to accomplish?

    Thanks!

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

    Re: Combine two separate forumulas in one cell with one result

    Perhaps?

    =IF(E7="yes",IF(B7="Avgas",VALUE(D3-0.0171),D3),IF(B7="Jet",VALUE(D4-0.0171),D4))
    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.

  4. #4
    Registered User
    Join Date
    09-15-2008
    Location
    Vancouver, Washington
    MS-Off Ver
    2007
    Posts
    11

    Re: Combine two separate forumulas in one cell with one result

    Actually, try this.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-09-2011
    Location
    ft. lauderdale, fl
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Combine two separate forumulas in one cell with one result

    sorry that i didn't explain...i have prices of two different fuel types, jet (d4) and avgas (d3) if avgas is chosen and is imported "yes", then i want the result to subtract the .0171 from (d3), and if jet is chosen and is imported "yes", then i want the result to subract the .0171 from (d4) and the yes is not chosen, i just want d4 or d3 to appear dependent on avgas or jet?

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

    Re: Combine two separate forumulas in one cell with one result

    Try:

    =IF(B7="Avgas",D3-IF(E7="Yes",0.0171,0),IF(B7="Jet",D4-IF(E7="Yes",0.0171,0),""))

  7. #7
    Registered User
    Join Date
    02-09-2011
    Location
    ft. lauderdale, fl
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Combine two separate forumulas in one cell with one result

    thanks...error message says too many arguments...

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

    Re: Combine two separate forumulas in one cell with one result

    Are you sure? I just re-entered it and it is fine for me.

  9. #9
    Registered User
    Join Date
    02-09-2011
    Location
    ft. lauderdale, fl
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Combine two separate forumulas in one cell with one result

    PERFECT!!!! that one worked...awesome thank you....

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

    Re: Combine two separate forumulas in one cell with one result

    I guess you were referring then to the Cascus formula having too many args?

  11. #11
    Registered User
    Join Date
    02-09-2011
    Location
    ft. lauderdale, fl
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Combine two separate forumulas in one cell with one result

    yes...i would have never figured that formula out...i need to study it....

  12. #12
    Registered User
    Join Date
    09-15-2008
    Location
    Vancouver, Washington
    MS-Off Ver
    2007
    Posts
    11

    Re: Combine two separate forumulas in one cell with one result

    Yeah, my bad. I accidentally added an extra ,D4) at the end. Sorry. Here is the correct version, although NBVC formula you should use as it addresses your situation.

    Please Login or Register  to view this content.
    I just can't leave my code bad.
    I Love Pizza

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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