Conditional Formatting of a cell in Excel when it is divisible by decimals less than 0.5

hannahmc8

New Member
Joined
Jun 27, 2011
Messages
17
Conditional Formatting of a cell in Excel when it is divisible by decimals less than 0.5.
I want to highlight the cell if the amount entered is not divisible by 20pence, 10pence and 5pence. It works for £50, £20, £10, £5, £1 and 50p with
=MOD(A1,50)=0
replacing the 50 with 20 for £20, 10 for £10, 5 for £5, 0.5 for 50pence etc but when I try to repeat this for divisible by 20p as =MOD(A1,0.2)=0, it just doesn't work!
Thank you in advance,
Hannah
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Could be a floating point precision problem...

try either

=MOD(ROUND(A1,2),0.2)=0
or
=MOD(A1,ROUND(0.2,2))=0


Do any of those work?
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,794
Members
452,943
Latest member
Newbie4296

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