Think I need a MAX / MIN formula here (help needed)

M

Mark D

Hi Again

I need a formula that does the following

A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1

Therefore this should return 2

Any ideas

Thank you
 
S

Stefi

Think over your example!
Therefore this should return 2 What is this 2, it doesn't show up in the example.

=IF(B2<A1,min(C2,A1),"whatif B2>=A1")

returns C2 if B2<A1 but A1 if C2>A1 (won't exceed A1) but you didn't specify
the case B2>=A1.

--
Regards!
Stefi



„Mark D†ezt írta:
 
J

Joe User

Mark D said:
A1 = 41
B2 = 39
C2 = 6

=IF(B2<A1),C2 BUT DO NOT EXCEED A1
Therefore this should return 2

You are not being clear or consistent in your requirements. Neither C2 nor
A1 is 2. Do you mean (wild-ass guess):

=max(0, min(A1-B2,C2))


----- original message -----
 

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