Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
smith.james0
 
Posts: n/a
Default Conditional Formatting options


Is there any way of getting more than three conditions when conditional
formatting?


--
smith.james0
------------------------------------------------------------------------
smith.james0's Profile: http://www.excelforum.com/member.php...o&userid=16230
View this thread: http://www.excelforum.com/showthread...hreadid=382635

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Depends on what you're looking to do. If you're interested in no more
than 6 font colors (or a combination of font and no more than 4
background colors for a total of 6), see

http://www.mcgimpsey.com/excel/conditional6.html


For more/different combinations, see

http://www.mvps.org/dmcritchie/excel/event.htm#case

In article ,
smith.james0
wrote:

Is there any way of getting more than three conditions when conditional
formatting?

  #3   Report Post  
smith.james0
 
Posts: n/a
Default


I want the cells to change colour depandent on the value in them, i need
4 colours tho


--
smith.james0
------------------------------------------------------------------------
smith.james0's Profile: http://www.excelforum.com/member.php...o&userid=16230
View this thread: http://www.excelforum.com/showthread...hreadid=382635

  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

If one of the colors is the default color, you can use CF. Otherwise use
the reference I gave you.

In article ,
smith.james0
wrote:

I want the cells to change colour depandent on the value in them, i need
4 colours tho

  #5   Report Post  
Annabelle
 
Posts: n/a
Default

I used this formula for a project status report that required 4 colors
(added cases for another spreadsheet requiring 8 colors). Right click
on the worksheet name -- select View Code -- paste this formula. The
result: when "Green" is entered in a cell, both the background and the
font is green. You can replace the verbiage in quotation with your
specific value. Remove the font section if you just want to change the
cell shading.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant
Set vRngInput = Intersect(Target, Range("a6:af250"))
If vRngInput Is Nothing Then Exit Sub
For Each rng In vRngInput
'Determine the color
Select Case rng.Value
Case Is = "Green": Num = 4 'green
Case Is = "Yellow": Num = 6 'yellow
Case Is = "Red": Num = 3 'red
Case Is = "Blue": Num = 11 'dark blue
End Select
'Apply the color to background
rng.Interior.ColorIndex = Num
'Determine the color
Select Case rng.Value
Case Is = "Green": Num = 4 'green
Case Is = "Yellow": Num = 6 'yellow
Case Is = "Red": Num = 3 'red
Case Is = "Blue": Num = 11 'dark blue
End Select
'Apply the color to the font
rng.Font.ColorIndex = Num
Next rng
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting Error ddate Excel Worksheet Functions 0 May 5th 05 09:00 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"