Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 4th, 2007, 03:23 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: , , Finland.
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
Reply With Quote
  #2 (permalink)  
Old June 5th, 2007, 03:26 PM
Friend of Wrox
Points: 513, Level: 8
Points: 513, Level: 8 Points: 513, Level: 8 Points: 513, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Davenport, IA, USA.
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.

Reply With Quote
  #3 (permalink)  
Old June 6th, 2007, 05:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: , , Finland.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting in Continuous Forms Balasarius Access 3 September 19th, 2008 08:06 AM
conditional formatting jeremy1048 Access 4 July 3rd, 2008 12:20 PM
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 04:52 PM



All times are GMT -4. The time now is 03:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.