View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Remove a row if data is bold

Hi,

If there's a possibility that 2 adjacent rows could be bold you may want to
run the code backwards by changing this line

For I = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1

Mike

"JR" wrote:

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