Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Delete Non-bolded lines only

How would I write to delete any lines that in column A which are not bolded
and not include blank cells?

Thanks!

Annette


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Delete Non-bolded lines only

Dim lastrow as Long
Dim i as Long
Dim cell as Range
lastrow = cells(rows.count,1).End(xlup).row
for i = lastrow to 1 step -1
set cell = cells(i,1)
if cell.Font.Bold then
if not isempty(cell) then
cell.EntireRow.Delete
end if
end if
Next

--
Regards,
Tom Ogilvy

"Annette" wrote in message
...
How would I write to delete any lines that in column A which are not

bolded
and not include blank cells?

Thanks!

Annette




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Delete Non-bolded lines only


iLastRow = Cells(Rows.Count,"A").End(xlUp).Row
For i = iLastRow to 1 step -1
If Cells(i,"A").Value = "" Or _
Cells(i,"A").Font.Bold = False Then
Rows(i).Delete
End If
Next i

--
HTH

Bob Phillips

"Annette" wrote in message
...
How would I write to delete any lines that in column A which are not

bolded
and not include blank cells?

Thanks!

Annette




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Blank Lines Saxman Excel Discussion (Misc queries) 3 January 9th 07 01:46 AM
Bolded Text To Column henrikb Excel Worksheet Functions 0 March 20th 06 01:35 PM
the sum of all bolded numbers Sam12345 Excel Worksheet Functions 5 November 21st 05 03:20 AM
how to sort list, bolded items from no bolded? tcd50 Excel Discussion (Misc queries) 1 July 9th 05 10:29 PM
count non bolded items Annette[_4_] Excel Programming 2 December 20th 04 08:31 PM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"