• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help - Conditional Formatting change font size

Khalid NGO

Excel Ninja
Hello experts,

Is there any way to change the font or font size in conditional formatting?

Thanking you in anticipation,
Khalid.
 
Yes.. you can achieve this by conditional formatting, just click format button while applying formula.. in that click Font tab on the above.. and select bold option and other options also
 
Thanks Sir Hui and Vijay,

Actually the "Font" and "Size" options are disable.
Suppose i need Red color and Difference Font + Small Size for the units below 500.
 

Attachments

  • Conditional formatting.xlsx
    10.2 KB · Views: 15
Khalid
Actually you can't change the Font or Size in CF
Because changing those would potentially change the Column Width and other issues on the worksheet
CF is designed to change the Visibility of the cell, not it's inherent properties like cell size.

It could be done with VBA if really required.
 
The following VBA Code will do what you want

Add it to the Worksheet Module in VBA

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("D3:D18")) Is Nothing Then
  If Target.Value <= 500 Then
  With Target.Font
  .Color = -16776961
  .Name = "Arial Narrow"
  .Size = 8
  End With
  Else
  With Target.Font
  .Color = -16250872
  .Name = "Calibri"
  .Size = 12
  End With
  End If
End If
End Sub

see attached:
 

Attachments

  • Conditional Formatting.xlsm
    19.3 KB · Views: 19
Wow its working Hui, excellent....

I just want to say you are a genius man with big heart who always ready to help others.
God bless you.
 
Back
Top