populating a cell with the difference from another

N

ng66

I have a simple question that I just can't figure it out. I type out what
sounds like it should work, but then excel isn't happy with MY formula. This
is how it seems logical to me: =b8(IF>40)-40

So, obviously, what I would like to know how to do is populate the excess of
40 into a given cell. Sounds like a simple function but heck if I can figure
it out.

Thanks for whatever tips you can give me.
 
D

Dave O

An IF works by evaluating a logic situation, then returning one answer
if the logic is evaluated as True and another if the evaluation is
False. The format is IF(logical question, true evaluation, false
evaluation).

So if I read your post right, your formula should look like this:
=IF(B8>40,B8-40,0)
This returns a zero if B8 is less than 40. You can enter another
response such as "" (2 double quotes) if you want to return a blank
cell.

Does that do it for you?
Dave O
 
D

David Biddulph

It isn't entirely clear what you are trying to do. If you want the amount
by which B8 exceeds 40, and to output 0 if B8 doesn't exceed 40, then try
=MAX(B8-40,0)

If you want it blank if B8 doesn't exceed 40, then try
=IF(B8>40,B8-40,"")
 
N

ng66

Thanks, Dave. Weird thing is it worked for column B but when I changed the
formula for other columns (I need it for columns B-F), it populated the
formula and not the result of it. All I did was change the column letter.
Should I convert it in some other way?

Thanks again!
 
D

Dave F

If you see the formula and not its calculation, the cell in question is
likely formatted as text. Format as General, or Number, or something else.

Dave
 
Top