+ Reply to Thread
Results 1 to 4 of 4

Adding a max and min to an IF formula in Excel 2010

  1. #1
    Registered User
    Join Date
    01-16-2013
    Location
    northleach
    MS-Off Ver
    Excel 2010
    Posts
    28

    Cool Adding a max and min to an IF formula in Excel 2010

    Hi,
    Hoping someone might be able to help. I have, eventually, completed my IF formula, but want to add a limit to the number it returns. I do not want any negative numbers (these should be displayed as '0') and I want to limit the maximum number to that of a specific cell, O12.

    The formula is as follows-

    =IF((K18/K12*O12)<(O12-((M12-M18)*G12)),(K18/K12*O12),(O12-((M12-M18)*G12)))

    Does this make sense to anyone?

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Adding a max and min to an IF formula in Excel 2010

    Something like this, I think:

    =MAX(0,MIN(IF((K18/K12*O12)<(O12-((M12-M18)*G12)),(K18/K12*O12),(O12-((M12-M18)*G12))),O12))

  3. #3
    Registered User
    Join Date
    01-16-2013
    Location
    northleach
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Adding a max and min to an IF formula in Excel 2010

    Wow, thanks ! Worked perfectly.
    Please can you do the same to this, more simple, formula?

    =O12-((M12-M14)*G12)

    No negatives and not higher than cell O12, please.

    Thanks again..

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Adding a max and min to an IF formula in Excel 2010

    Sure, it's easy enough to do:

    =MAX(0,MIN(O12-((M12-M14)*G12),O12))

  5. #5
    Registered User
    Join Date
    01-16-2013
    Location
    northleach
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Adding a max and min to an IF formula in Excel 2010

    Thank you, Andrew. A big help !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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