# help on If formula

#### aravindhan_31

##### Well-known Member
Hi,

I need help on If formula

If the difference between Cell A1 and B1 is 200, then value in C1 should be 0 or else 1

Cell A1 Cell B1 Cell C1
200 400 0
400 200 0
-200 400 0
200 600 1

I dont know how to give formula to find the difference.I cant use this formula =If(B1-A1=200,'0','1') or If(a1-b1=200,'0','1'). this will give me the result and not the difference.

regards
Arvind

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### DonkeyOte

##### MrExcel MVP
not sure whether you mean abs difference ?

C1 =IF(ABS(A1-B1)=200,0,1)

if you need to ABS both A1 + B1 (ie -200-400 = 200 (?)) then

C1 = IF(ABS(ABS(A1)-ABS(B1))=200,0,1)

#### aravindhan_31

##### Well-known Member
Hi,

thanks its working.....

Replies
6
Views
138
Replies
5
Views
119
Replies
0
Views
250
Replies
4
Views
123
Replies
5
Views
186

1,191,168
Messages
5,985,054
Members
439,936
Latest member
BSR

### 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.

### Which adblocker are you using?

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

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