Formatting

colinh

Board Regular
Joined
Dec 2, 2010
Messages
60
Hi All

I have a work sheet and in any cell in this worksheet if I type the word "Yes" in any case upper or lower the cell highlights yellow and the word is bold.

I can do this with conditional formatting for specific cells but I dont know in what cell or cells I need to type the word yes so it needs to be in any cell in the worksheet

Thanks in advance

Colin
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
With Target
    If LCase(.Value) = "yes" Then
        .Interior.ColorIndex = 6
        .Font.Bold = True
        .Value = StrConv(.Value, vbProperCase)
    End If
End With
Application.EnableEvents = True
End Sub
 
Upvote 0
Try

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
With Target
    If LCase(.Value) = "yes" Then
        .Interior.ColorIndex = 6
        .Font.Bold = True
        .Value = StrConv(.Value, vbProperCase)
    ElseIf .Value = "" Then
        .Interior.ColorIndex = xlNone
        .Font.Bold = False
    End If
End With
Application.EnableEvents = True
End Sub
 
Upvote 0
Hey
With conditional formatting you can click on left column A to select all sheet and put this formula =A1="yes"
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,920
Latest member
jaspers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top