Formula to Subtract to a Limit ?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I need some way to subtract column b from column a... but I do not
want the result to go below zero.

Ex 200-100=100
200-300 = 0 (reached zero lower limit)

Is there an excel formula... or perhaps some way to program a little
code to do this? If it's programming, give me a couple clues on how to
enter the code - I'm a programmer but don't know much about Excel
aside from a bit of advanced formula entry.

Thanks,
 
=B1-A1 will subtract value in A1 for value in B1
=MAX(0, B1-A1) will limit the answer to zero
=IF(B1>A1, B1-A1,0) does the same
best wishes
 
=B1-A1 will subtract value in A1 for value in B1
=MAX(0, B1-A1) will limit the answer to zero
=IF(B1>A1, B1-A1,0) does the same
best wishes

Thanks all!
 

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

Back
Top