VBA - Delete row if cell contents bold text
Dim CCell As Range
On Error Resume Next
For Each CCell In Intersect(ActiveSheet.Columns(2), ActiveSheet.UsedRange)
If CCell.Characters.Font.Bold Then CCell.EntireRow.Delete
Next CCell
On Error Goto 0
This only works if the entire cell is bolded; if you need to find if any
individual character is bold you would have to step through each Character in
CCell.Characters - that would also take significantly more time to run. So
hopefully this simple version is what you need.
--
- K Dales
"Scott Wagner" wrote:
How can this be modified to delete a row if bold text is in a specific column?
On Error Resume Next
Columns(2).SpecialCells(xlCellTypeBlanks).EntireRo w.Delete
On Error GoTo 0
Thanks!
Scott
|