PC Review


Reply
Thread Tools Rate Thread

Conditional format Font Type(not colour) change

 
 
frankod
Guest
Posts: n/a
 
      23rd Jun 2008
HI Guys, I am trying to get the font type to change on a conditional format
basis.
The screen options let me select colours but I would like to change the font
type which is visible but greyed out. ?? Any help appreciated
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      23rd Jun 2008
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target

If .Value > 100 Then

.Font.Name = "Marlett"
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"frankod" <(E-Mail Removed)> wrote in message
news:045F4814-9C8B-4923-92C2-(E-Mail Removed)...
> HI Guys, I am trying to get the font type to change on a conditional
> format
> basis.
> The screen options let me select colours but I would like to change the
> font
> type which is visible but greyed out. ?? Any help appreciated



 
Reply With Quote
 
frankod
Guest
Posts: n/a
 
      24th Jun 2008

Thanks Bob - will give it a go.
Franko

"Bob Phillips" wrote:

> Private Sub Worksheet_Change(ByVal Target As Range)
> Const WS_RANGE As String = "H1:H10" '<== change to suit
>
> On Error GoTo ws_exit
> Application.EnableEvents = False
>
> If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
> With Target
>
> If .Value > 100 Then
>
> .Font.Name = "Marlett"
> End If
> End With
> End If
>
> ws_exit:
> Application.EnableEvents = True
> End Sub
>
> 'This is worksheet event code, which means that it needs to be
> 'placed in the appropriate worksheet code module, not a standard
> 'code module. To do this, right-click on the sheet tab, select
> 'the View Code option from the menu, and paste the code in.
>
>
> --
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
> "frankod" <(E-Mail Removed)> wrote in message
> news:045F4814-9C8B-4923-92C2-(E-Mail Removed)...
> > HI Guys, I am trying to get the font type to change on a conditional
> > format
> > basis.
> > The screen options let me select colours but I would like to change the
> > font
> > type which is visible but greyed out. ?? Any help appreciated

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format to change row colour Jenny P Microsoft Excel Misc 1 24th May 2010 05:39 PM
Change cell colour on formula result change, no conditional format roster_jon Microsoft Excel Programming 0 2nd Dec 2008 12:11 PM
Conditional format if cell=0 then font colour same as background . =?Utf-8?B?UGFsaWdhcA==?= Microsoft Excel Misc 2 20th Dec 2004 12:07 AM
Can you change font colour automatically for a cell when you type. =?Utf-8?B?ZWFydGhseV9hbmdlbA==?= Microsoft Excel Worksheet Functions 3 25th Aug 2004 04:12 PM
Conditional format - change cell colour according to the text within it Ian R Microsoft Excel Worksheet Functions 2 3rd Jun 2004 09:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 AM.