Bold all rows where a cell contains text "X"

  • Thread starter Thread starter limpuiting
  • Start date Start date
L

limpuiting

I want to BOLD all rows where a cell contains text "X" in any cell in
range.

Does anyone has the solution?
 
Hi
Please amend accordingly:

Sub PutInBoldXs()
Dim r As Range
With Range("A1:C10")
Set r = .Find("X", LookIn:=xlValues, searchorder:=xlByRows)
If Not r Is Nothing Then r.EntireRow.Font.Bold = True
End With
End Sub


HTH
Cordially
Pascal
 
Hi
Please amend accordingly:

Sub PutInBoldXs()
Dim r As Range
With Range("A1:C10")
Set r = .Find("X", LookIn:=xlValues, searchorder:=xlByRows)
If Not r Is Nothing Then r.EntireRow.Font.Bold = True
End With
End Sub

HTH
Cordially
Pascal

<[email protected]> a écrit dans le message de (e-mail address removed)...





- Show quoted text -

Although I had changed the range to A1:H1000, only one row was bold.
 
Sub PutInBoldXs()
Dim r As Range
With Range("A1:C10")
Set r = .Find("X", LookIn:=xlValues, searchorder:=xlByRows)
If Not r Is Nothing Then
r.EntireRow.Font.Bold = True

Do
Set r = .FindNext(r)
If Not r Is Nothing Then
r.EntireRow.Font.Bold = True
end if
Loop While Not c Is Nothing

end if
End With
End Sub
 
Sub PutInBoldXs()
Dim r As Range
With Range("A1:C10")
Set r = .Find("X", LookIn:=xlValues, searchorder:=xlByRows)
If Not r Is Nothing Then
r.EntireRow.Font.Bold = True

Do
Set r = .FindNext(r)
If Not r Is Nothing Then
r.EntireRow.Font.Bold = True
end if
Loop While Not c Is Nothing

end if
End With
End Sub






- Show quoted text -
It work but the system hang???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top