Change Font Color According To Another Cell's Font Color

richard blaine

Board Regular
Joined
May 19, 2005
Messages
67
For instance: the font color of B1 is determined by the font color of A1; if A1 is red, then B1 will be red.

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
What caused the A1 to be red?

Perhaps you can apply the same condition to B1?
 
Upvote 0
>What caused the A1 to be red? Perhaps you can apply the same condition to B1?

No expressed condition -- A1 was manually changed
 
Upvote 0
Excel, itself, does not allow for conditional formatting based on font color, type or size of another cell. They are based on contents (strings, numerical, etc.)

You will need a macro.

Hopefully, someone out there can offer help as they will surely come up with a simple solution for you.
 
Upvote 0
As far as I know this can only be done with VBA. Here is one potential approach. But I'm thinking it would probablly be easier to just format the cells.
Code:
Option Explicit
Sub MatchFont()
Dim RNG As Range
On Error Resume Next
Set RNG = Application.InputBox("Use your mouse to select range of cells whose fonts you wish to match.", "My Font Thingy", , , , , 8)
If Err.Number <> 0 Then
    End
    Else
    Selection.Font.ColorIndex = Range(RNG.Address).Font.ColorIndex
    Selection.Font.FontStyle = Range(RNG.Address).Font.FontStyle
    Selection.Font.Underline = Range(RNG.Address).Font.Underline
    Selection.Font.Name = Range(RNG.Address).Font.Name
    Selection.Interior.ColorIndex = Range(RNG.Address).Interior.ColorIndex
    Selection.HorizontalAlignment = Range(RNG.Address).HorizontalAlignment
    Selection.VerticalAlignment = Range(RNG.Address).VerticalAlignment
    Selection.WrapText = Range(RNG.Address).WrapText
    Selection.Orientation = Range(RNG.Address).Orientation
    Selection.ShrinkToFit = Range(RNG.Address).ShrinkToFit
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,073
Messages
6,182,707
Members
453,132
Latest member
nsnodgrass73

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top