IF Function

M

mrfrenchy

Hi, another request. Try to use the IF function for homework.

If a cell total is greater than 12 each point gets a bonus point. If the
total is less than 12 they get penalized 2 points each. I started with what
I have below but now it's all just a blur. :)

=IF(G4>12),((12-G4)*1),((12-G4)*-2))

Thanks for any help out there!>!>
 
A

Andy Brown

You don't need the *1 at all. For the formula to return just the bonus
points (plus or minus):

=IF(G4>12,G4-12,(12-G4)*-2)
 
B

Biff

If a cell total is greater than 12 each point gets a bonus point. If the
total is less than 12 they get penalized 2 points each.

What if the total *IS* 12?

What results would you expect for each of these:

20
10
1
0

Biff
 
D

Dana DeLouis

If G4 is 9, this function below results in -18?

I read it the same way, meaning it should be -18. If I'm not mistaken, then
I think you meant that 2 points are subtracted for each point "shy" of 12.
If so, I think your equation has to be changed slightly from ((12-G4)*1), to
G4-12.
Perhaps an alternative...

=MIN(G4-12,2*G4-24)
 

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