ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Capital letters (https://www.excelbanter.com/excel-discussion-misc-queries/452107-capital-letters.html)

Akash Maheshwari

Capital letters
 
Hi Team,

How can I ensure that only capital letters are keen in specific cells of a specific sheet.

Awaiting for your response.

Best Regards

Akash Maheshwari

Claus Busch

Capital letters
 
Hi,

Am Wed, 7 Sep 2016 23:12:11 -0700 (PDT) schrieb Akash Maheshwari:

How can I ensure that only capital letters are keen in specific cells of a specific sheet.


what exactly do you want? Do you want to enter only a single character?
Then try it with Data Validation = Custom:
=AND(CODE(A1)=65,CODE(A1)<=90)

If a whole word or string should be in capital letters try it with
Worksheet_Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Or _
Target.Count 1 Then Exit Sub

Application.EnableEvents = False
On Error GoTo CleanUp

Target = UCase(Target)

CleanUp:
Application.EnableEvents = True
End Sub


Regards
Claus B.
--
Windows10
Office 2016

everonvietnam2016

sản phẩm tốt, giá rẻ, chất lượng, an to*n cho người dùng, dịch vụ ráo, lúc n*o có điều kiện qua ủng hộ nhé. chúc c*a h*ng l*m ăn hiệu quả


All times are GMT +1. The time now is 10:24 AM.

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