Conditional IF Formula

Dolphin123

New Member
Joined
Jun 21, 2010
Messages
37
Im trying to use the IF formula: IF (A2=B2, true, false).
But if A2 is $26,466.48 and B2 is $26,466.49 this is close enough for my purposes and I would like the result to be 'true' rather than false. Can I define a parameter (such as within $0.50) to generate a true result?

Thank you.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try:

=IF(ABS(A2-B2)<=0.5,TRUE,FALSE)

Or, alternatively we could round them to 1 decimal place for a bit more accuracy:

=IF(ROUND(A2,1)=ROUND(B2,1),TRUE,FALSE)

Or if you simply want a TRUE/FALSE displayed, we can remove the IF altogether:

ABS(A2-B2)<=0.5
=ROUND(A2,1)=ROUND(B2,1)
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,543
Members
452,924
Latest member
JackiG

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