+ Reply to Thread
Results 1 to 4 of 4

Two formulas in one cell

  1. #1
    Registered User
    Join Date
    01-26-2017
    Location
    USA
    MS-Off Ver
    MS2010
    Posts
    2

    Two formulas in one cell

    I am trying to calculate a value based on another value in a certain cell. For example. If the value in A1=JS, I would like to use the formula =Sum(C2*.87) + (C3*2.20). If the cell is blank or null, then use =Sum(C2*.85) + (C3*1.85)

    Thanks for any help. It seems very simple but I am struggling!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Two formulas in one cell

    You can do this:

    =IF(A1="", Sum(C2*.85) + (C3*1.85), IF(A1="JS", Sum(C2*.87) + (C3*2.20), "")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-26-2017
    Location
    USA
    MS-Off Ver
    MS2010
    Posts
    2

    Re: Two formulas in one cell

    Thanks! The actual formula I have is below and it doesn't seem to work. I am sure it is the way I have parenthesis:
    IF(C11="", Sum(1.05+(H11*.85)+(I11*0.15)+ G11)*0.75, IF(C11="JS", Sum(2.4+(H11*1.65)+(I11*0.15)+(G11)*0.75, "")

    C11 is where I put in the value JS

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Two formulas in one cell

    Well, those SUM terms are different than the ones you originally posted, but assuming the new ones are what you require, you can write the formula like this:

    IF(C11="",(1.05+H11*.85+I11*0.15+G11)*0.75,IF(C11="JS",(2.4+H11*1.65+I11*0.15+G11)*0.75,""))

    I've got rid of all the spurious brackets and the SUM functions (which are not needed), and I've added another bracket to the end which I inadvertently missed off in Post #2.

    There may still be some adjustments to make, as it is not exactly clear from your formula whether you intend to multiply everything by 0.75, or just the G11 term. As it stands, the 0.75 is multiplying everything, but if you only intend it to multiply the G11 term then you should omit all the brackets shown in red.

    Hope this helps.

    Pete

+ 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. Replies: 4
    Last Post: 10-19-2016, 02:45 PM
  2. Using Cell references in file paths for formulas to create dynamic formulas
    By MichaelStokesJr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2013, 11:49 AM
  3. View cell info instead of formulas / Evaluate formulas
    By whitetea in forum Excel General
    Replies: 2
    Last Post: 05-20-2012, 10:08 AM
  4. Excel 2007 : Future Date Formulas and Adjacent Cell Formulas
    By thetaylor13 in forum Excel General
    Replies: 4
    Last Post: 02-09-2011, 04:33 PM
  5. Multiple formulas in selected cell without damaging previous formulas.
    By excel5111987 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-05-2011, 06:15 AM
  6. Replies: 5
    Last Post: 05-05-2008, 02:22 PM
  7. Formulas in a cell don't work as formulas.
    By Lyle McElhaney in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2007, 05:04 AM

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