IF, but Not to Exceed

  • Thread starter Thread starter dnamertz
  • Start date Start date
D

dnamertz

Can I add an argument to an IF statement that will result in a calculation,
but not if it exceeds a certain amount? For example, can I have an IF
statement display the result F5-F4, but if F5-F4 exceeds E5 then it will
display E5?
 
The responses you got were correct for the example you gave, but the general
answer to your question is yes and a general IF solution would read

=IF(Test,Calculation1,Calculation2)
or with your sample:

=IF(F5-F4>E5,E5,F5-F4)
 
Back
Top