View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Remove a row if data is bold

Try

Sub deleteboldrows()
mc="a"
For i = 2 To cells(rows.count,mc).end(xlup).row
If Cells(i, mc).Font.Bold Then Rows(i).Delete 'MsgBox i
Next i
other code here
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JR" wrote in message
...
I have a report that comes from another source. It repeats the header
every so many lines and that can vary. The header is the only bold
thing in the spreadsheet. Is there a way to parse thru the
spreadsheet and any row that it finds something in the A column is
bold, delete the whole row? Also there are funny characters in the
spreadsheet at the end and I have the below macro running to strip it
all out. Not sure if a macro could be integrated into this so there
is only one?

Sub fixme()
Selection.Replace What:=Chr(160), Replacement:="", LookAt:=xlPart,
_
SearchOrder:=xlByRows, MatchCase:=False
End Sub

Any ideas would be appreciated.

Thanks.

JR