IF formula

P

Peekaboo012885

I'm trying to enter an IF formula but can't seem to get it written
correctly...what I want to do is " IF x is > or = $150 then the value is 5,
if less than 150 then value is 0."
 
G

Gaurav

=IF(X>=150,5,0)

It's better to use cell references. for example =IF(A1>=150,5,0)

Thanks
 
D

Dave Peterson

If you want to check the value in A1, you could put this formula in B1:

=if(a1>=150,5,0)
 
D

David Biddulph

Not really necessary to use OR.
You can change =IF(OR(A2>150,A2=150),5,0) to =IF(A2>=150,5,0)
 
P

Peekaboo012885

thanks for the replies but I just realized I didn't word my question
correctly...I'm looking to assign that formula but to a range of cells in a
column (k3 through k50), however I want the total of all in cell k51.
 
B

Bob I

Perhaps you should rewrite the question in it's entirety as the
piecemeal approach is rather ambiguous.
 
D

David Biddulph

If in cell K51 you want the sum of K3 to K50, the formula in K51 is
=SUM(K3:K50)
If K3 to K50 is where you have your values that you want to test against
150, try =5*COUNTIF(K3:K50,">="&150)
 
Top