ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete bolded items in column (https://www.excelbanter.com/excel-programming/334666-delete-bolded-items-column.html)

Annette

Delete bolded items in column
 
How would I delete any items in, say column G, through a macro. I'm finding
I have to manually delete items and it would save time to do this through a
macro.

Thanks!

Annette



Roy

Delete bolded items in column
 
Annette,

This simple test worked to delete BOLD formatted cells in column A, rows
1-26 on the Active Sheet. You could subtutute your own looping device.

For x = 1 To 26
If Cells(x, 1).Font.Bold = True Then
Cells(x, 1).Value = ""
End If
Next

Roy

"Annette" wrote:

How would I delete any items in, say column G, through a macro. I'm finding
I have to manually delete items and it would save time to do this through a
macro.

Thanks!

Annette




Roy

Delete bolded items in column
 
Annette,

You might want to turn off the bold format from inside the loop at the same
time if the same cells aren't being deleted each time by adding this to the
loop.

Cells(x, 1).Font.Bold = False

Roy

"Roy" wrote:

Annette,

This simple test worked to delete BOLD formatted cells in column A, rows
1-26 on the Active Sheet. You could subtutute your own looping device.

For x = 1 To 26
If Cells(x, 1).Font.Bold = True Then
Cells(x, 1).Value = ""

Cells(x, 1).Font.Bold = False 'add to drop bold
End If
Next

Roy

"Annette" wrote:

How would I delete any items in, say column G, through a macro. I'm finding
I have to manually delete items and it would save time to do this through a
macro.

Thanks!

Annette




Annette

Delete bolded items in column
 
Perfect and saves me tons of time!

Thanks!
"Roy" wrote in message
...
Annette,

This simple test worked to delete BOLD formatted cells in column A, rows
1-26 on the Active Sheet. You could subtutute your own looping device.

For x = 1 To 26
If Cells(x, 1).Font.Bold = True Then
Cells(x, 1).Value = ""
End If
Next

Roy

"Annette" wrote:

How would I delete any items in, say column G, through a macro. I'm
finding
I have to manually delete items and it would save time to do this through
a
macro.

Thanks!

Annette







All times are GMT +1. The time now is 08:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com