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

Conditional formatting cannot change font size.

You could use an event macro. Put this in your worksheet code module
(right-click on the worksheet tab and choose View Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const nREGULARSIZE = 10
Const nLARGESIZE = 14
With Range("A1:C1")
If Not Intersect(.Cells, Target) Is Nothing Then
.Font.Size = nREGULARSIZE
.Item(Application.Match(Application.Max( _
.Cells), .Cells, False)).Font.Size = nLARGESIZE
End If
End With
End Sub

Note that if there's a tie, the left-most cell will have the large size.

If you want all cells with the highest value to be large:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const nREGULARSIZE = 10
Const nLARGESIZE = 14
Dim rCell As Range
Dim dMax As Double
With Range("A1:C1")
If Not Intersect(.Cells, Target) Is Nothing Then
.Font.Size = nREGULARSIZE
dMax = Application.Max(.Cells)
For Each rCell In .Cells
If rCell.Value = dMax Then _
rCell.Font.Size = nLARGESIZE
Next rCell
End If
End With
End Sub

Both of these assume that A1:C1 contain numeric values.


In article ,
"dbrumit" wrote:

I would like the the font of the highest value of 3 cells. A1,B1,C1 to be
large.

Thanks