Macro's: IF/SUB? OR?

M

MrDave

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
 

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