Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2007, 02:23 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default Conditional formatting

Hi

Any ideas how to use conditional formatting cells with different fill color?

I want rows following:
1-4 with red
5-8 with blue
9-12 with red
13-16 with blue and so on.




-vemaju
__________________
-vemaju
 
Old June 5th, 2007, 02:26 PM
Friend of Wrox
 
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This isn't really a coding question, unless you're planning on setting the conditional formatting with code.

In any case, set the conditional formatting like this:

From the spreadsheet:
1) Select entire spreadsheet
2) Click Format > Conditional Formatting
3) Click down arrow and change from "Cell Value Is" to "Formula Is"
4) Put this in the formula cell:
=MOD((ROW()-1),8)>3
5) Set color for that format to blue (Click "Format" Button and choose your conditional formatting)
6) Set the default color for the sheet to red and you're done. Or, optionally, you can add another format following these steps:
   a) Click "Add >>" button
   b) Click down arrow for condition 2 and change from "Cell Value Is" to "Formula Is"
   c) Put this in the formula cell for condition 2:
   =MOD((ROW()-1),8)<4
   d)Set color for that format to red (Click "Format" Button and choose your conditional formatting)

Hope this helps.

 
Old June 6th, 2007, 04:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Allen

Thanks for quick response.
Thats just what I want

I know how to to the trick with VBA but I want it happen automatically

-vemaju





Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting in Continuous Forms Balasarius Access 3 September 19th, 2008 07:06 AM
conditional formatting jeremy1048 Access 4 July 3rd, 2008 11:20 AM
Conditional Formatting on Subform echovue Access 4 March 3rd, 2006 03:25 AM
Conditional Formatting Corey Access 1 November 8th, 2005 12:18 AM
Conditional Formatting... In Access??? lguzman Access VBA 2 September 23rd, 2004 03:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.