+ Reply to Thread
Results 1 to 7 of 7

Multiple formulas in one cell

  1. #1
    Registered User
    Join Date
    03-23-2017
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    2

    Multiple formulas in one cell

    Current formula I have is as follows:

    =IF(I15>="90",1*H15*0.65+N15+M15,IF(AND(I15>=80),1*H15*0.6+N15+M15,IF(AND(I15>=95)*1*0.70*H15+N15+M15,0)))

    The first two are working and can not say the same about the third. As soon as I choose a option that has a 95 in I15 drop down list it is defaulting to the "90" formula. I need the formula to read the 95 formula.

    If anyone can also tell me how to add this additional formula it would be great. Im guessing it should be IF(AND(I15>=70)*1*0.5**H15+N15+M15

    I dont care what order this is put in as long as it works when I choose between 70, 80, 90, and 95 from my drop down list in I15.

    Thanks

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Multiple formulas in one cell

    Hi jbsiegmund and welcome to the forum,

    You need to use a VLookup Table for your formula. You would put in a value between 0 and 95 and it would return your correct factor. You are looking for the last argument of True.

    Read:

    https://www.excelcampus.com/function...st-match-true/

    or watch
    https://exceljet.net/tips/how-to-use...ximate-matches
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    12-06-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    72

    Re: Multiple formulas in one cell

    Hi,

    Try This

    =IF(AND(I15>=90,I15<95),1*H15*0.65+N15+M15,IF(AND(I15>=80,I15<90),1*H15*0.6+N15+M15,IF(I15>95,1*0.7*H15+N15+M15,0)))

  4. #4
    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,929

    Re: Multiple formulas in one cell

    Welcome to the forum

    A few observations on your formula...
    =IF(I15>="90",1*H15*0.65+N15+M15,IF(AND(I15>=80),1*H15*0.6+N15+M15,IF(AND(I15>=95)*1*0.70*H15+N15+M15,0)))

    1. whenever you put a value inside "" it becomes and is no longer seen as a value, to remove the "" from around 90
    2. you use AND (or OR) if you need to test for a few things, not just 1...AND(name="Bob",age>10)
    3. unless the 1* part will change, it is kind of superfluous in there, 1*a number = that number
    4. It looks like you have some constants in there, they can often be moved to outside the IF statements
    5. If is almost always better to keep the tests in order, either ascending or descending, you have yours mixed up

    So, having said all that, perhaps...
    =if(I15<=80,0,H15*if(I15>80,0.6,if(I15>90,0.65,0.7))+N15+M15
    (untested)
    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

  5. #5
    Registered User
    Join Date
    03-23-2017
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    2

    Re: Multiple formulas in one cell

    This now works when I15 has a value of 95. It is no longer working when I have a value of 90 or 80.

    There is ultimately 4 different options in I15. It can either be 95, 90, 80 or 70.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Multiple formulas in one cell

    how about below 70 what will happened?
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Multiple formulas in one cell

    ok so
    =LOOKUP(I5,{0,70,80,90,95},{1,0.5,0.6,0.65,0.7})
    so if less than 70 will give it a value 1

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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 Multiple Formulas in One Cell
    By j3b1l1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-14-2015, 11:43 AM
  3. [SOLVED] Multiple IF Formulas in one Cell
    By moni_tm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2015, 01:36 PM
  4. [SOLVED] multiple formulas needed in one cell to create a value in a new cell
    By jamietofs in forum Excel General
    Replies: 13
    Last Post: 11-18-2012, 06:40 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: 2
    Last Post: 03-29-2010, 07:07 PM
  7. multiple formulas in one cell
    By roy.okinawa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2005, 01:10 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