Excel 2010-2019
Excel 2007
Excel 2003
Tips & Tricks
Excel Forum
Course Index CIG Excel Book
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 

Extend Conditional Formatting in Excel
Use Visual Basic for Conditional Formatting with more than 3 items in Excel 2003
 
Q: I am using Excel 2003. I need to increase the number of Conditional Formatting options available up to 5 or 6 options. Can you help me?
   
A: Excel 2003 and earlier only allow up to 3 Conditional Formatting options, as I showed you in one of my previous Tips & Tricks videos. However, using a little bit of VBA (Visual Basic for Applications) code, you can extend the maximum number of Conditional Formatting options as high as you want. You're limited only by your imagination.
 
 
Here is the code that you need to insert into your spreadsheet. The free video below explains exactly how to do this, step by step.
 


Private Sub Worksheet_Change(ByVal Target As Range)
  Set I = Intersect(Target, Range("B2:B8"))
  If Not I Is Nothing Then
    Select Case Target
      Case 0 To 100: NewColor = 37 ' light blue
      Case 101 To 200: NewColor = 46 ' orange
      Case 201 To 300: NewColor = 12 ' dark yellow
      Case 301 To 400: NewColor = 10 ' green
      Case 401 To 600: NewColor = 3 ' red
      Case 601 To 1000: NewColor = 20 ' lighter blue
    End Select
    Target.Interior.ColorIndex = NewColor
  End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  Range("F1:F1") = Range("F1:F1").Interior.ColorIndex
End Sub


 

We have a FREE video tutorial that shows you how to do this step-by-step.
 
 Click here to view the FREE video

I also cover Conditional Formatting in much more detail in my Excel 104 class, and I will be covering all of the VBA material in greater depth a future lesson. Make sure you get on my mailing list to be notified when it's completed.

 


By Richard Rost   Richard Rost on LinkedIn Email Richard Rost
Click here to sign up for more FREE tips

 

 

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 9:56:26 AM. PLT: 0s