i want to change lower case of the string entered in the cell to upper case immediately, not by executing any function after entering. is there any build in function or any other way to do this?
i want to change lower case of the string entered in the cell to upper case immediately, not by executing any function after entering. is there any build in function or any other way to do this?
Beginner
krishnarao
There is the spreadsheet function =UPPER(), but it sounds like you don't want that.
You could put this in the code module for the Sheet in question. It will capitalize strings typed in or pasted in. It will not effect numbers, formulas or arrays.
![]()
Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim xRay As Range Application.EnableEvents = False On Error Resume Next For Each xRay In Target.SpecialCells(xlCellTypeConstants).Cells If Not (xRay.HasFormula Or xRay.HasArray) Then _ xRay.Value = UCase(xRay.Value) Next xRay On Error Goto 0 Application.EnableEvents = True End Sub
Last edited by mikerickson; 05-16-2007 at 12:30 AM.
it does change to capital letters but i want to chg it at moment user types the string in the cell itself, while this code changes when string is completed or focus changes.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks