How do I add two numbers if a range is true or false?

willcocr

New Member
Joined
Nov 23, 2005
Messages
1
Hi,

Am trying to do the following, I know the logic in my head but cant get a formula to do the same thing.

Have a value in a cell, say X, I want the forumla to examine that number and if the number is less than a value of 1200 I want it to add 800 to the X value and give me a total ie X+800.

In addition if X is greater than 1200 then I want it to calculate the difference between 2000 and X and give me that value, leaving the value of 2000 in my calculation cell but telling me what the difference was in another cell

ie if X was 1700 in this example then the figure is 2000 in the cell with 300 being the difference.

Any thoughts?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Say you have X in A1 and 2000 in B1 does this do what you want?

=IF(A1<1200, A1+800, B1-A1)
 
Upvote 0

Forum statistics

Threads
1,203,563
Messages
6,056,092
Members
444,846
Latest member
pbailey

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