Macro to Simulate CF Italic Red Font based on Formula Criteria

  • Thread starter Sam via OfficeKB.com
  • Start date
S

Sam via OfficeKB.com

Hi All,

I would like to use the cell Font colour to analyse data by summing and
counting the cells by Font colour.

I'm having difficulty in turning the Conditional Formula below into a Macro
to colour the matched criteria cell(s) with Red Italic Font.
Can anyone convert my original CF below to a VBA Macro to colour criteria
matching cells
with Red Italic Font?

Range("CD5:EZ5").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND(CD$9>TRANSPOSE(Label_MEDIAN),CD$10>TRANSPOSE(Label_MEDIAN))*CD
$6>TRANSPOSE(Label_MEDIAN)"
With Selection.FormatConditions(1).Font
.ColorIndex = 3
.Bold = False
.Italic = True
End With

Thanks
Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top