Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ideal Code deleting rows/based on bold text
Is a code run where it selects only the lines that have bolded text plus one
(above) and delete all others lines that are not qualified. Is this possible? Say, there are bold number or text found on rows 5, 8, 12, 22. When the code runs, it would delete rows 1, 2, 3, 6, 9, 10, 13, 14, 15, 16, 17, 18, 19, and 20. Can this be done? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ideal Code deleting rows/based on bold text
Sub test()
Dim i As Long With ActiveSheet i = .Cells(Rows.Count, 1).End(xlUp).Row Do Until i < 1 If .Cells(i, 1).Font.Bold = True Then i = i - 2 Else .Rows(i).Delete xlShiftUp i = i - 1 End If Loop End With End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "Samm" wrote in message ... Is a code run where it selects only the lines that have bolded text plus one (above) and delete all others lines that are not qualified. Is this possible? Say, there are bold number or text found on rows 5, 8, 12, 22. When the code runs, it would delete rows 1, 2, 3, 6, 9, 10, 13, 14, 15, 16, 17, 18, 19, and 20. Can this be done? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting Rows based on a Value | Excel Worksheet Functions | |||
Deleting rows in two columns with a code in visual basic | Excel Discussion (Misc queries) | |||
Deleting rows based on a cell value | Excel Worksheet Functions | |||
Deleting Rows based on text in cell & formatting cell based on text in column beside it | Excel Programming | |||
Deleting rows based on criteria | Excel Programming |