Macro's: IF/SUB? OR?
Hi, working on a macro trying to limit font changes to just selection made.
during part of replace selection.. font changes in different cells where
not doing the replace, only want font fix in cell the replace.
thanks.
2. also like to know if way to do an OR, if have 2 values eg: A or B, for
If Range(testB1).Value = "A" Then
'WEB ADDRESSES: way to combine these?
With Target
If Not Intersect(Me.Range("a:ia"), .Cells) Is Nothing Then
Application.EnableEvents = False
.Value = Replace(.Value, "http://www.", "")
Application.EnableEvents = True
With Selection.Font '4 lines not doing what want, just cell
if www. etc.
.Name = "Arial"
.Size = 8
End With
End If
If Not Intersect(Me.Range("a:ia"), .Cells) Is Nothing Then
Application.EnableEvents = False
.Value = Replace(.Value, "www.", "")
Application.EnableEvents = True
End If
If Not Intersect(Me.Range("a:ia"), .Cells) Is Nothing Then
Application.EnableEvents = False
.Value = Replace(.Value, "http://", "")
Application.EnableEvents = True
End If
'With Selection.Font
'.Name = "Arial"
'.Size = 8
'End With
End With
|