+ Reply to Thread
Results 1 to 4 of 4

IF to check a calculation result

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    IF to check a calculation result

    Hi all,

    I'm just wondering - I have a situation where I need to run a calculation based on other cells' values, then check to see if the result of the calculation is over a certain amount and if not, display a particular value, but if it is over the threshold amount, to display the actual result of the calculation. (I'm building a calculator to give to managers in my organization to let them calculate salary ranges for positions in their departments including adjustments based on geographical region, and we have an internal minimum wage of $12/hr, so if the geo-adjusted result is under $12 it needs to be bumped up.)

    Normally I do something like
    Please Login or Register  to view this content.
    so that the action taken if the test returns "false" is itself the formula from the test.

    However, in this instance the calculation itself is a ridiculous bear involving index/match and bits and pieces from several sheets, so I'm trying to avoid having to repeat the whole thing. So if I do it my usual way, I would end up with
    Please Login or Register  to view this content.
    Is there a shorter way to express that? Because that piece is itself nested in another IF, because there are two possible calculations it might need to run depending on the text in a third place, so that means I'd have that long index/match calculation string repeated 4 times in one formula! And I can do that, but it looks messy and seems inefficient, and I'm wondering if there's a trick to this that I just haven't figured out yet.

    Thanks!

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

    Re: IF to check a calculation result

    Given the simple version
    =IF(A1*B1<12,12,A1*B1)

    Try
    =MAX(12,A1*B1)

  3. #3
    Registered User
    Join Date
    04-28-2014
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: IF to check a calculation result

    Perfect! Works a treat. I'd never heard of the MAX function before, thank you SO much!

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

    Re: IF to check a calculation result

    You're welcome.

    FYI, there is also a MIN function. And you might guess that it works exactly the opposite.

    MIN(12,A1*B1)

    If the A1*B1 is GREATER than 12, then it returns 12, otherwise returns the result of A1*B1

+ 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. [SOLVED] Certain value in a range, result by a cell calculation
    By saillantjn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2013, 02:09 PM
  2. [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
  3. Replies: 1
    Last Post: 01-05-2012, 09:14 PM
  4. formating the calculation result
    By yjmmay34 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2010, 11:53 AM
  5. Result of Roundup used in a calculation
    By Davey-S in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2007, 02:51 PM
  6. Replies: 1
    Last Post: 06-09-2006, 08:10 AM
  7. [SOLVED] cell calculation check if result is negative and zero out if not l
    By Rich in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2006, 04:35 PM
  8. How do I use a rounded calculation result in another calculation?
    By vnsrod2000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-26-2005, 06:06 PM

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