# IF with Decimals

1. ## IF with Decimals

Hello, I have two values in two different columns (Col A and B) with a third (Col C) being the difference between A and B.

I have a formula in Col D as "=if (A1-B1=0.01125,"NC","C")". Even if the difference in value between A and B is equal to 0.01125, it gives the result value as "C".

Regards

RK

2. ## Re: IF with Decimals

Try this:

=IF(ROUND(A1-B1,5)=0.01125,"NC","C")

3. ## Re: IF with Decimals

Thanks. Its solved.

4. ## Re: IF with Decimals

Display values A1 and B1 with 10 decimal places: you will probably find the difference is not exactly 0.01125.

You will need to apply a ROUND function to A1 and B1

=IF(ROUND(A1,5)-ROUND(B1,5)=0.01125,"NC","C")

5. ## Re: IF with Decimals

You're welcome!

6. ## Re: IF with Decimals

[.... deleted by me; duplicate ....]

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1