How do you get excel to automatically subract if its over a certain value?

JustOneQuestion

New Member
Joined
Jul 5, 2016
Messages
19
I am trying to get excel to show what is left over 40. Is it possible? I do not want any negative numbers either. Here is an example:
45.25
5.25
59.2519.25
43.253.25
29.75-10.25
30.5-9.5
21-19

<colgroup><col><col></colgroup><tbody>
</tbody>
All I did was subtract 40 from column A. But I do not want the values in B if it is negative. If the value in A isn't over 40, I do not want anything in column B. I tried a countif formula, but that will either take the whole number, or only a 1. Neither of which helps me.

Any thoughts?

Thanks!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Assuming 45.25 is in cell A2 (change to suit) try this:

=IF(A2>=40,A2-40,0)

Robert
 
Upvote 0
Hi,

This will also work:


Excel 2010
AB
145.255.25
259.2519.25
343.253.25
429.750
530.50
6210
Sheet1
Cell Formulas
RangeFormula
B1=MAX(0,A1-40)
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,011
Members
449,204
Latest member
tungnmqn90

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top