Can't change font on conditional formatting

  • Thread starter Thread starter faustino Dina
  • Start date Start date
F

faustino Dina

Hi,

I'm playing with the Conditional Formatting of a cell. I need to change the
font according to the value of the cell. The problem is the font selector is
disabled on the conditional format dialog. Is not possible to change the
font when conditional formatting the cell or may be I'm missing something?

Thanks in advance
 
Hi
Conditional format does not support changing the font type. If you need
this youll have to use VBA (processing the worksheet_change event).
e.g.the following code checks column A for a specific value (put this
in your worksheet module):

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value = 1 Then
.Font.Name = "Arabic Transparent" 'change this
font name
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
 
That is correct. My take is that Conditional formatting does not support
changing anything that might change the overall format of the worksheet.
Changing the font could result in data being cut off unless the column is
made wider because the characters in the font might require more space (as
an example). Thus size is not an option either.
 
Back
Top