This must be simple but for Mac Excel it seems more difficult.
I just need to create a Macro that replaces all text color that is 7811599
Here is the general idea...
If Font.Color = 7811599 Then
Replacement.Font.Color = RGB(0, 51, 160)
a lot more VBA than i thought!I could have wimped out and given you three lines of code starting with For Each cel In Selection.Cells, but chose to restrict the search to those cells that actually contained values. I also gave you the option of pre-selecting a range of cells or letting the macro apply to the entire worksheet (if only one cell was pre-selected).
Sub UpdateFontColor() Dim cel As Range, rg As Range, rgC As Range, rgF As Range Set rg = Selection If rg.Cells.Count = 1 Then Set rg = rg.Worksheet.UsedRange On Error Resume Next Set rgC = rg.SpecialCells(xlCellTypeConstants) Set rgF = rg.SpecialCells(xlCellTypeFormulas) If Not rgC Is Nothing Then Set rg = rgC Set rg = Union(rg, rgF) Else Set rg = rgF End If For Each cel In rg.Cells If cel.Font.Size > 8 Then cel.Font.Color = RGB(0, 51, 160) cel.VerticalAlignment = xlBottom End If Next End Sub
The very last Blue Text Header of this file is not being affected by this script. Any idea why?
If cel.Font.Color <> 0 Then
I created an image (before / after) for you too see the color difference.