"Not More Than" in a formula

E

EMW103

Is there a way to have excel, as part of a formula, list a sum only as long
as it is not more than ____? The formula as it currently stands is:
=IF(AND(C12="Pharmacy",ISNUMBER(X12),D12>5),D12-5). I'd like the final part
of the calculation to be sort of "D12-5 but not more than $30".
 
D

David Biddulph

=IF(AND(C12="Pharmacy",ISNUMBER(X12),D12>5),MIN(D12-5,30),"whatever answer
you want if the condition isn't met")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top