• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro instead of conditional formatting

I have another post on having to program every sheet in several books (60 sheets per book) can I use a Macro to do the same thing?

How it works is I have 4 digit counters that are 1-9, when it reaches 9 it starts back over again to 1 ... so...1234567891234567891 My Odd numbers are shaded with bright yellow and red font, my Even numbers are shaded gray with green font. They are going up a row each time I press on cells HIJK OPQR VWXY .... all the way down my sheets. How can I program a Macro to do this? It seems that would be a lot easier than conditional formatting.


Here is an example and the other post

http://forum.chandoo.org/threads/ive-lost-my-conditional-formatting.17000/
 

Attachments

  • Copy of MASTER Updates short sheets_EB_V2.xlsm
    70 KB · Views: 3
Hi Larry ,

I suggest you simplify your CF rules to just 2 ; select your entire worksheet and apply the following :

=AND(A1<>"",A1<10,ISEVEN(A1))

=AND(A1<>"",A1<10,ISODD(A1))

Unless you wish for other cells to be formatted differently.

Narayan
 
Hi Larry,

Try this. Press Cell A1 on a sheet to do conditional formatting.
You may copy the code in your master workbook (inside the ThisWorkbook module).
 

Attachments

  • Conditional Formatting_Giloy.zip
    863.6 KB · Views: 4
Back
Top