Hi Alan
Code works perfectly where there are several columns next to Col A where the text is in bold
I have another sheet where there is only one value next to the text which is in bold and I get type mismatch and the following code is highlighted
I have amended your code to produce a thick border box where there is is one value to the right of the bold textCode:If c.Font.bold = True And Len(c.Offset(0, 1)) > 0 Then
Kindly test & amend
Code:Sub Thick_Border_Bank() Sheets("Man Accounts Bank").Select Dim lr As Long lr = Range("A" & Rows.Count).End(xlUp).Row Dim c As Range Dim rng As Range Set rng = Range("A1:A" & lr) For Each c In rng If c.Font.bold = True And Len(c.Offset(0, 1)) > 0 Then c.Offset(, 1).Select Selection.BorderAround Weight:=xlThick End If Next c MsgBox "complete" End Sub




Reply With Quote
Bookmarks