![]() |
Delet row if bold
Does anyone have a macro to evaluate column A and delete if formatting is
<bold? |
Delet row if bold
Jeff,
Sub DeleteBold() Dim myRow As Long For myRow = Range("A65536").End(xlUp).Row To 1 Step -1 If Cells(myRow, 1).Font.Bold Then Cells(myRow, 1).EntireRow.Delete Next myRow End Sub HTH, Bernie MS Excel MVP "jeffbert" wrote in message ... Does anyone have a macro to evaluate column A and delete if formatting is <bold? |
Delet row if bold
Sub DeleteBold()
set rng =Range("a1: a" &[a65536].End(xlup).Row) For each c in rng If c.font.Bold = True Then c.Clear End if Next End Sub DM "jeffbert" wrote in message ... Does anyone have a macro to evaluate column A and delete if formatting is <bold? |
Delet row if bold
Thanks to both of you for the help. Is there a way to select a variable
column? I have just run across a situation where sometimes I need column A, sometimes B, etc. "David Myle" wrote: Sub DeleteBold() set rng =Range("a1: a" &[a65536].End(xlup).Row) For each c in rng If c.font.Bold = True Then c.Clear End if Next End Sub DM "jeffbert" wrote in message ... Does anyone have a macro to evaluate column A and delete if formatting is <bold? |
Delet row if bold
Sub DeleteBold()
Dim myRow As Long Dim col as long col = ActiveCell.Column For myRow = Cells((rows.count,col) _ .End(xlUp).Row To 1 Step -1 If Cells(myRow, col).Font.Bold Then _ Cells(myRow, 1).EntireRow.Delete Next myRow End Sub -- Regards, Tom Ogilvy "jeffbert" wrote in message ... Thanks to both of you for the help. Is there a way to select a variable column? I have just run across a situation where sometimes I need column A, sometimes B, etc. "David Myle" wrote: Sub DeleteBold() set rng =Range("a1: a" &[a65536].End(xlup).Row) For each c in rng If c.font.Bold = True Then c.Clear End if Next End Sub DM "jeffbert" wrote in message ... Does anyone have a macro to evaluate column A and delete if formatting is <bold? |
All times are GMT +1. The time now is 05:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com