Data Validation - Propercase

S

Sandy

Hi
I have the following code and I am having difficulty in setting certain
cells as Propercase.
Not sure if this has any bearing but Cell E3 is actually E3:G3 merged as H3
is actually H3:J3 merged.
Any help would be good.

If Not Intersect(ActiveCell, Range("E3,H3,B6,E6,H6")) Is Nothing Then
Exit Sub

ElseIf EmptyRng(Sheets("Current Round").Range("E3,H3,B6,E6,H6")) Then
Exit Sub

Else
'*****make the contents of cells E3, H3, E6, H6 - Propercase *******
End If

TIA
Sandy
 
B

Bob Phillips

If Not Intersect(Target, Range("E3,H3,B6,E6,H6")) Is Nothing Then
Exit Sub

ElseIf EmptyRng(Sheets("Current Round").Range("E3,H3,B6,E6,H6")) Then
Exit Sub

Else
Target.Value = Application.Proper(Target.Value)
End If


--
HTH

Bob

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

Sandy

Excellent Bob
Thank you very much
Sandy

Bob Phillips said:
If Not Intersect(Target, Range("E3,H3,B6,E6,H6")) Is Nothing Then
Exit Sub

ElseIf EmptyRng(Sheets("Current Round").Range("E3,H3,B6,E6,H6")) Then
Exit Sub

Else
Target.Value = Application.Proper(Target.Value)
End If


--
HTH

Bob

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

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