ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Validation - Propercase (https://www.excelbanter.com/excel-programming/412235-data-validation-propercase.html)

Sandy

Data Validation - Propercase
 
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


Bob Phillips

Data Validation - Propercase
 
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)

"Sandy" wrote in message
...
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




Sandy

Data Validation - Propercase
 
Excellent Bob
Thank you very much
Sandy

"Bob Phillips" wrote in message
...
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)

"Sandy" wrote in message
...
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





All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com