IF statements

  • Thread starter Dave in Ampthill
  • Start date
D

Dave in Ampthill

Hi,

I have a column of cells ranging from F46 to F51

I want cell F51 to be the sum of F46:F50 with the following conditions:

If SUM(F46:F50) = 0 then F51 to read 0
If SUM(F46:F50)<200 then F51 to read 200
If SUM(F46:F50)>200 then F51 to show actual sum of F46:F50

How do I write this as a formula?

Many thanks in advance,

Dave
 
M

macropod

Hi Dave,

Try:
=(SUM(F46:F50)<>0)*(SUM(F46:F50)<200)*200+(SUM(F46:F50)>=200)*SUM(F46:F50)

Note: you need to provide for SUM(F46:F50)=200, which I have done. I assume that, if you have -ve values to deal with, you want them
to display '200' also, as there's nothing in your problem description to allow for another outcome. If -ve values require a '0'
result, delete the first '<' from the formula.
 
S

Stefi

One way:
=IF(SUM(F46:F50)=0,0,MAX(200,SUM(F46:F50)))
Regards,
Stefi

„Dave in Ampthill†ezt írta:
 

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