ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   automatic capital letter in a cell (https://www.excelbanter.com/excel-worksheet-functions/164921-automatic-capital-letter-cell.html)

capital letter

automatic capital letter in a cell
 
If I write anything in a cell, that should be capital letter automatically.
how can I do it. Suggest me.

Gary''s Student

automatic capital letter in a cell
 
Without VBA:

use the CAPSLOCK key


With VBA, enter the following macro in the worksheet event code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Target
Application.EnableEvents = False
If Application.WorksheetFunction.IsText(r) Then
r.Value = UCase(r.Value)
End If
Application.EnableEvents = True
End Sub
--
Gary''s Student - gsnu200753


"capital letter" wrote:

If I write anything in a cell, that should be capital letter automatically.
how can I do it. Suggest me.



All times are GMT +1. The time now is 08:40 AM.

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