#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default 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


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
Macro's are fun Chris Excel Worksheet Functions 0 February 7th 08 06:09 AM
Macro's 148steve Excel Discussion (Misc queries) 4 November 14th 06 09:39 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
Macro's CraigM Excel Worksheet Functions 2 January 17th 06 01:06 PM
Macro's Ron Excel Discussion (Misc queries) 1 December 27th 05 03:41 PM


All times are GMT +1. The time now is 01:39 PM.

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"