+ Reply to Thread
Results 1 to 6 of 6

Modify An If Statement To Return A Max Value

  1. #1
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Exclamation Modify An If Statement To Return A Max Value

    Hi All,

    I'm hoping I can get some help in modifying this function. I've simplified the function to include numbers rather than cell references for the portions of the function that are doing computations. I don't know if more information will be necessary to help me, but I will start with this and add additional information as necessary. How would I modify the function so that the active cell would automatically return 100 if the value of the computations, regardless of which one it runs, was greater than 100?

    HTML Code: 
    Thanks in advance for any help on this. I did try adding another logic criteria to the AND portion of the initial function, but couldn't figure out how to make it work.

    Matt

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: Modify An If Statement To Return A Max Value

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Replace "Your IF formula" with your existing formula)
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: Modify An If Statement To Return A Max Value

    I have no idea about the constant values in your formula, i.e, 15*0.153*25+4*0.153*12,
    but all of them are smaller 100, except the last one: 11*0.153*22+25*0.153*35 = 170.901 (in condition of no " topped" found in Input!B2 and V22<>"*"

    Therefore below formula has same result with #2 one:

    Please Login or Register  to view this content.
    Quang PT

  4. #4
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Re: Modify An If Statement To Return A Max Value

    TMS,

    Thank you for your help! This appears to work as intended. I appreciate the help.

  5. #5
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Re: Modify An If Statement To Return A Max Value

    Bebo021999,

    I apologize for any confusion. I hadn't checked the values to ensure they were less than a hundred. I didn't think the constraint values would be necessary to help me in this instance. The MIN function that TMS suggested seems to have worked perfectly. Thanks for your help.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,385

    Re: Modify An If Statement To Return A Max Value

    You're welcome. Thanks for the rep.

+ 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] Modify An IF Statement To Differentiate Between Two Product Types And Their Geometry
    By Proj_Eng in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-13-2021, 12:32 PM
  2. [SOLVED] Modify statement to post a zero (0) in the cell when variable = 0 in the equation?
    By Jim15 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-23-2013, 04:19 PM
  3. [SOLVED] Need to modify Macro to repeat sequencial statement
    By jonrack in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-03-2012, 02:38 PM
  4. Modify cell address within an IF statement
    By codyj1919 in forum Excel General
    Replies: 1
    Last Post: 12-20-2011, 05:30 PM
  5. Modify macro statement
    By bandrews in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2007, 09:54 AM
  6. trying to modify IF Statement result
    By oakman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2007, 10:51 AM
  7. How can I modify the SELECT statement?
    By wliong in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-08-2006, 12:09 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