+ Reply to Thread
Results 1 to 4 of 4

Set A Max Value

  1. #1
    Registered User
    Join Date
    02-15-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    23

    Set A Max Value

    Hi Everyone


    is it possible to set a max value within an IF loop.

    =IF(P6=11,MAX(40,Y6-T6),"N/A")

    formula i sued

    Y6 = 92
    T6 = 42

    when i run the above formula i should get 40, instead im getting 50, how to overcome this problem?

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Set A Max Value

    Maybe this way (use code delimiters when entering code or formulas

    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Set A Max Value

    Shoudln't you be using MIN instead of MAX ? if the difference exceeds 40 it will then return 40. If not, the result will be returned

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Set A Max Value

    True, True I overread that

+ 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