+ Reply to Thread
Results 1 to 4 of 4

IF statement that execute a different calculation based on cell content.

  1. #1
    Registered User
    Join Date
    02-19-2012
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2013
    Posts
    69

    IF statement that execute a different calculation based on cell content.

    I'm working on a project that requires me to "speed up" or "slow down" a value based on whether the employee is not meeting, meeting or exceeding an expected goal.

    To make it easier (for me) I've already entered a formula that converts values that are less than 100% to "FALSE" and values that are > or = to 100% to "TRUE".

    But what I cant figure out is how to add 1 cell to another if the answer is "FALSE" and subtract 1 cell from another if the answer is "TRUE".

    I thought that entering the IF criteria: $AJ118 = FALSE then entering the formula if the criteria is true and what formula it should execute if the criteria is not true, but it still only calculates it if it's false.

    =IF($AJ$118 = FALSE, (M122+AL122), (M122-AL122))

    Thoughts?

  2. #2
    Registered User
    Join Date
    06-15-2016
    Location
    here, there
    MS-Off Ver
    2010
    Posts
    59

    Re: IF statement that execute a different calculation based on cell content.

    Without a file it is hard to figure out the problem. That being said the question I have is in the cell AJ118 does it have FALSE or "FALSE" as the value? if it is the later then remove the quotation marks.







    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'. To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'. Clicking this button will open a new window for uploading attachments. You can upload an attachment either from your computer or from another URL by using the appropriate box on this page. Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file. To upload a file from another URL, enter the full URL for the file in the second box on this page. Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window. You can then close the window to return to the new post screen.

  3. #3
    Registered User
    Join Date
    02-19-2012
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2013
    Posts
    69

    Re: IF statement that execute a different calculation based on cell content.

    I included the formula that is currently entered. It does not have quotes (I've made that mistake before). =IF($AJ$118 = FALSE, (M122+AL122), (M122-AL122))
    It'll take me a while to dumb down a version of the workbook since it is confidential.

  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
    53,049

    Re: IF statement that execute a different calculation based on cell content.

    This is a shot in the dark, without seeing what is in those cells, but try this...
    =IF($AJ$118 = "FALSE", (M122+AL122), (M122-AL122))
    or this shorter version...
    =M122+IF($AJ$118 = "FALSE", AL122, -AL122)
    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

+ 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. Change content of one cell based on content of another
    By stlellen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-18-2014, 03:26 PM
  2. Automatically copy cells content based on the content of another cell.
    By chrisbarlow1984 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-01-2014, 11:13 AM
  3. Clear cell content based on another cell calculation
    By zozo23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2012, 03:10 PM
  4. [SOLVED] Conditional statement calculation based on result of previous calculation.(Need some help)
    By takeprofit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2012, 01:45 AM
  5. copying cell content into a specific workbook based on the content in that cell
    By krishna reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2012, 03:52 AM
  6. Replies: 2
    Last Post: 12-19-2006, 10:50 PM
  7. [SOLVED] can i execute a calculation in a cell at a certain time of the day
    By terry in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2006, 11:10 AM

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