Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting

Status
Not open for further replies.

Evening

Technical User
Jan 19, 2005
45
CA
In conditional formatting of fields, is it possible to use bold frames for some condition? Giving the condition and choosing the Format-Border i don't see that i can choose bold type of lines. Also there is know possibility to use in Format-Fonts bold letters. Is it normal or just I don't know something?
 
My problem is still there: Why do I have 13 different line styles to use for border if I use formatting fields, untill if I use formating fields under conditional formatting, it appears just 6 different line styles. Do I need to Set Excell somewhere to have more line styles?
 
You just don't get access to all the built in styles when using CF, same as if you look at the Font tab you will see you don't get a choice of font as an option within CF.

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
---------------- Click here to help the tsunami victims ----------------

 
Thanks Ken, at least I know there is no way to achieve this in CF.
 
Not in conventional CF maybe, but you can always use code to simulate it:-

Private Sub Worksheet_Calculate()
'Code must be placed in the codemodule of the actual sheet you are working with.
Dim oCell As Range
For Each oCell In Range("A1:A20")
With oCell.Borders(xlEdgeBottom)
.LineStyle = xlNone
End With

Select Case oCell.Value
Case Is < 1
oCell.Interior.ColorIndex = xlNone

Case Is = 1
oCell.Interior.ColorIndex = 5
With oCell.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

Case Is = 2
oCell.Interior.ColorIndex = 3
Case Is = 3
oCell.Interior.ColorIndex = 6
Case Is = 4
oCell.Interior.ColorIndex = 4
Case Is = 5
oCell.Interior.ColorIndex = 7
Case Is = 6
oCell.Interior.ColorIndex = 15
Case Is = 7
oCell.Interior.ColorIndex = 40
Case Is > 7
oCell.Interior.ColorIndex = xlNone
End Select

Next oCell
End Sub

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
---------------- Click here to help the tsunami victims ----------------

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top