Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default IF, but Not to Exceed

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF, but Not to Exceed

Try this:

=MIN(F5-F4,E5)

--
Biff
Microsoft Excel MVP


"dnamertz" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF, but Not to Exceed

On Sat, 24 Jan 2009 10:18:00 -0800, dnamertz
wrote:

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?


something like =max(e5,f5-f4)

--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF, but Not to Exceed

On Sat, 24 Jan 2009 13:34:27 -0500, Ron Rosenfeld
wrote:

On Sat, 24 Jan 2009 10:18:00 -0800, dnamertz
wrote:

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?


something like =max(e5,f5-f4)

--ron


Ooops -- that should have been =min(e5,f5-f4)
--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default IF, but Not to Exceed

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-F4E5,E5,F5-F4)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"dnamertz" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Exceed Greg Excel Worksheet Functions 8 October 27th 07 08:43 PM
Exceed Row Limit Freshman Excel Worksheet Functions 6 August 9th 07 05:10 PM
Exceed Row Limit Freshman Excel Worksheet Functions 0 August 9th 07 05:22 AM
Matching a value, which does not exceed Min or Max. Assad Excel Worksheet Functions 3 July 15th 07 05:08 PM
Exceed Scale MarkN Charts and Charting in Excel 5 November 12th 06 09:29 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"