VBA for SELECTING ONLY BOLD CELL

F

FARAZ QURESHI

Could one please devise a simple code which would be selecting cells with a
Bold format within a range.

In other words:

For each cell in selection.

Thanx.
 
M

Mike H

Hi,

Try this

Sub Select_Bold()
Dim BoldRange As Range
For Each c In ActiveSheet.UsedRange
If c.Font.Bold Then
If BoldRange Is Nothing Then
Set BoldRange = c
Else
Set BoldRange = Union(BoldRange, c)
End If
End If
Next
If Not BoldRange Is Nothing Then
BoldRange.Select
End If
End Sub

Mike
 
M

Mike H

Hi

For Each c In ActiveSheet.UsedRange

can be replaced with

For Each c In Selection

Mike
 
F

FARAZ QURESHI

Xclent intro to UNION statement. However, how to select all kinds of
underline cells?, i.e. even single/double accounting or simple underlines?

Thanx again
 
Joined
Jan 11, 2010
Messages
2
Reaction score
0
Selecting Bold Cell in Word

Hello,

Could anyone of you help with doing the same in Word?

Thanks,
abardos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top