Conditional Formating to Show Numbers NOT Divisible by another

S

Sliver Rayne

I want to add conditional formatting to show me any number that is divisible
by 54. So if the number is 108, it would be ok because it's divisible by 108
but if its 53, I want it highlighted because it is not divisible by 54

Thanks, in advance, for any assistance.
 
T

T. Valko

Try this:

A1 = 108

Select cell A1
Goto the menu Format>Conditional Formatting
Formula Is: =AND(A1<>0,MOD(A1,54)=0)
Click the Format button
Select the desired style(s)
OK out
 
S

Sliver Rayne

This did not work. Is it maybe because I need it to cover several cells
(A1.A7)? The conditional formatting would need to look at all of the amounts
in the cells and identify the cells that are not divisible by 54.
 
T

T. Valko

I had it backwards but you mentioned both conditions in your post:
show me any number that is divisible by 54.
identify the cells that are not divisible by 54.

So, I had a 50/50 chance of getting it right! <g>

To format cells that *are not divisble* by 54:

Select the range of cells A1:A7
Goto the menu Format>Conditional Formatting
Formula Is: =MOD(A1,54)
Click the Format button
Select the desired style(s)
OK out
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top