Have entire row be bold based on contents of cell in Column A

mlarson

Well-known Member
Joined
Aug 25, 2011
Messages
509
Office Version
  1. 2010
Platform
  1. Windows
Merry Christmas! I hope you can help me with this (hopefully/probably pretty simple).

For every cell in column A that shows "x" ("x" only, nothing else in cell), I would like that entire row to be bold. If it doesn't show "x" then nothing needs to change. For example...
A22 shows "x", I'd like row 22 to be bold.
A38 shows nothing, I'd like no change to row 38.
A87 shows "xyz", I'd like no change to row 87.
A156 shows "x", I'd like row 156 to be bold.

I hope I explained that clearly. Thanks in advance for your help! -Mark
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You can do that with conditional formatting like
+Fluff 1.xlsm
ABCDEFG
1PostcodeIn Use?LatitudeLongitudeEastingNorthingGridRef
2xYes53.02851-1.91721405650347917SK056479
3Yes51.75299-2.14309390219206042SO902060
4Yes53.01993-2.102393255346964SJ932469
5Yes53.75919-1.76996415264429228SE152292
6XE52.54611-2.12357391717294258SO917942
7xyzYes53.30377-1.50596433020378649SK330786
8EX17 5AGYes54.7892-1.70387419141543852NZ191438
Lists
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:G8Expression=$A2="x"textNO
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Or maybe a VBA...
VBA Code:
Option Compare Text
Sub MM1()
 Dim r As Long
 For r = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
    If Cells(r, 1) = "x" Then Range("A" & r & ":G" & r).Font.Bold = True
Next r
End Sub
 
Upvote 0
A non-looping alternative

VBA Code:
Sub Filterx()
    Application.ScreenUpdating = False
    
    With Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
    
        .AutoFilter 1, "x"
        
        On Error Resume Next
        .Offset(1).Resize(.Rows.Count - 1).SpecialCells(12).EntireRow.Font.Bold = True
        On Error GoTo 0
        .AutoFilter
    
    End With
    
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

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