Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jelinek
 
Posts: n/a
Default Formatting

I posed the following questions

The problem is
I have five conditions

Failed
File Failure
Active
Successful
Queued

I would like to assign a colour code to the cells when they equal one of the
five conditions the way conditional formatting is set up i only allows three
contditions?

is there anything that can be done to add another contdition

and was given the following response

Create a worksheet "SelectionChange" macro.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Text = "Failed" Then
With Selection.Interior
..ColorIndex = 6
..Pattern = xlSolid
..PatternColorIndex = xlAutomatic
End With
End If
If Selection.Text = "File Failure" Then
With Selection.Interior
..ColorIndex = 7
..Pattern = xlSolid
..PatternColorIndex = xlAutomatic
End With
End If
If Selection.Text = "Active" Then
With Selection.Interior
..ColorIndex = 3
..Pattern = xlSolid
..PatternColorIndex = xlAutomatic
End With
End If
If Selection.Text = "Successful" Then
With Selection.Interior
..ColorIndex = 4
..Pattern = xlSolid
..PatternColorIndex = xlAutomatic
End With
End If
If Selection.Text = "Queued" Then
With Selection.Interior
..ColorIndex = 5
..Pattern = xlSolid
..PatternColorIndex = xlAutomatic
End With
End If
End Sub

The problem is that for the formatting to occur a manual change is required
these cells are affected by VLookup and when the contents change the
formatting above does not get applied until the cell is activated using the
cursor has anyone got alternative solution?

Many Thanks
 
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
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
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 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 02:37 AM.

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"