Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default Clear Contents - NonBold cells

I have roughly 500-700 rows of information. All of my information is between
columns B and K. I would like to run a macro the clears the contents of the
cells based on NonBold font. For example; if b12 is is not bold, i want to
clear contents on b12:k12. Can anyone help?

Thanks,
Steve
  #2   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

Steve

some examples:

Sub test1()
If Range("B12").Font.Bold = False Then
Range("B12:K12").Clear
End If
End Sub

Sub test2()
Dim i As Long
For i = 2 To 14
If Range("B" & i).Font.Bold = False Then
Range("B" & i & ":K" & i).Clear
End If
Next 'i
End Sub

The first is specific to row 12; the second is for rows 2 to 14 - change to
suit.

Regards

Trevor


"Steve" wrote in message
...
I have roughly 500-700 rows of information. All of my information is
between
columns B and K. I would like to run a macro the clears the contents of
the
cells based on NonBold font. For example; if b12 is is not bold, i want to
clear contents on b12:k12. Can anyone help?

Thanks,
Steve



  #3   Report Post  
Steve
 
Posts: n/a
Default

Worked great. Thanks Trevor.

"Trevor Shuttleworth" wrote:

Steve

some examples:

Sub test1()
If Range("B12").Font.Bold = False Then
Range("B12:K12").Clear
End If
End Sub

Sub test2()
Dim i As Long
For i = 2 To 14
If Range("B" & i).Font.Bold = False Then
Range("B" & i & ":K" & i).Clear
End If
Next 'i
End Sub

The first is specific to row 12; the second is for rows 2 to 14 - change to
suit.

Regards

Trevor


"Steve" wrote in message
...
I have roughly 500-700 rows of information. All of my information is
between
columns B and K. I would like to run a macro the clears the contents of
the
cells based on NonBold font. For example; if b12 is is not bold, i want to
clear contents on b12:k12. Can anyone help?

Thanks,
Steve




  #4   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

You are very welcome


"Steve" wrote in message
...
Worked great. Thanks Trevor.

"Trevor Shuttleworth" wrote:

Steve

some examples:

Sub test1()
If Range("B12").Font.Bold = False Then
Range("B12:K12").Clear
End If
End Sub

Sub test2()
Dim i As Long
For i = 2 To 14
If Range("B" & i).Font.Bold = False Then
Range("B" & i & ":K" & i).Clear
End If
Next 'i
End Sub

The first is specific to row 12; the second is for rows 2 to 14 - change
to
suit.

Regards

Trevor


"Steve" wrote in message
...
I have roughly 500-700 rows of information. All of my information is
between
columns B and K. I would like to run a macro the clears the contents of
the
cells based on NonBold font. For example; if b12 is is not bold, i want
to
clear contents on b12:k12. Can anyone help?

Thanks,
Steve






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
Display contents of a specific cell even if a group of cells is mo Larry Heine Excel Worksheet Functions 5 December 4th 08 10:33 PM
Rotate a box with a cell's contents Circe Excel Discussion (Misc queries) 6 February 3rd 05 11:45 PM
Clear Contents But Not Formula Gancom3 Excel Discussion (Misc queries) 2 February 1st 05 11:30 PM
Adding contents of cells by clicking in Excel 2002 Kevin Gordon Excel Discussion (Misc queries) 7 January 11th 05 04:49 PM
Delete contents of unprotected cells in workbook BD7447 Excel Worksheet Functions 1 November 6th 04 05:41 PM


All times are GMT +1. The time now is 12:23 AM.

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

About Us

"It's about Microsoft Excel"