View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John[_19_] John[_19_] is offline
external usenet poster
 
Posts: 87
Default find by font size

I'm trying to avoid for/next loops in favor of the find function because
it is supposed to be a lot faster.
John

Gary Keramidas wrote:
this may do what you want:

Sub test()
Dim MyRange As Range
Dim fstr As String
Dim cell As Range
Set MyRange = Range("A1:I1")

For Each cell In MyRange
If cell.Font.Size = 18 Then
If fstr = "" Then
fstr = cell.Address
Else
fstr = fstr & ", " & cell.Address
End If
End If
Next
If fstr "" Then MsgBox fstr
End Sub