conditional format

Mon Wimp

New Member
Joined
Oct 24, 2004
Messages
27
Hi,
Can a cell change color if multiples of 7 are entered in a cell
Thanks Allan
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You would need to use 'formula is' from the first drop down list and set the formula to:

=MOD(A1,7)=0

Then design your conditional format as normal.

Note, A1 should refer to the top left cell in the block you're adding the conditional format to, and you should select the block beginning with this cell, otherwise you may have problems with referencing.

If it's only one cell, then of course the address should be the cell's address.

You could use this form:

=MOD(INDIRECT(CELL("address")),7)=0

but that seems a bit long winded.

edit: VoG's solution is better if you need to ignore blanks, but in terms of cell referencing, mine's worth a look too. You could probably adapt them to get the best of both worlds.
 
Upvote 0
Hello,

Your formulars are great but just to add to what Vog has;

If you are running a 2007 version perform the following;

0: Highlight the colunm you want to perform the conditional format on. Say the data is contained from colunm A1:A500
1: Select "Home" ribbon, and click on the drop-down of Conditional Formatting from the "Styles" tab.
2: Select "New Rules" from the list
3: Click on use a formular to determine which cell to format
4: Copy Vog's formular =AND(A1<>"",MOD(A1,7)=0) into the "Format values where this formula is true:"
5: Change the preview style by clicking on format .... Change the color and the font style
6: click on ok and ok.

Hope this helps...

Regards
 
Upvote 0
thanks for the responses, I have not been able to get it to work. Maybe because i am using 2010. Oooops did not mention it sorry. In conditional formatting box, there is no ? this true choice.
Allan
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

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