Bold/change font color in a range of cells based on text formatting of other cells in row

traxdmb34

New Member
Joined
May 2, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi, not sure if this is a job for conditional formatting or VBA. My goal is to be able to have font formatting in a range of cells change to match if any other cells in the row have formatted text. So in my example below, since G18 has bold red text, I would want A18:E18 to show up bold red. K19 is bold blue, so A19:E19 should be bold blue. I20 is bold magenta so A20:E20 should be bold magenta.

Tables will not always have the same amount of rows or columns...but I'm always going to want A:E to match based on if any cells in the rest of the row starting at G have any text formatting.

Hopefully this makes sense and is possible somehow? It's Friday. My brain is mush :ROFLMAO:

Thanks in advance for any insight!

1723835835719.png
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How are the initial cells formatted? By conditional formatting, manually, or by VBA?
If they are set manually or by VBA, then you probably need a VBA solution.
If it's by conditional formatting, what rules determine the formats? It's likely you can extend the rules to colour whole rows/columns or additional cells.
 
Upvote 0
VBA solution if it ends up not being Conditional Formatting compatible:
VBA Code:
Private Sub CopyFormats()
Dim i As Long, j As Long

For i = 18 To Cells(Rows.Count, "A").End(xlUp).Row
    For j = 7 To Cells(i, Columns.Count).End(xlToLeft).Column
        If Cells(i, j).Font.Bold = True Then
            With Range(Cells(i, 1), Cells(i, 5))
                .Font.Color = Cells(i, j).Font.Color
                .Font.Bold = True
            End With
        End If
    Next j
Next i

End Sub
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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