ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Need character for custom format to force upper case! (https://www.excelbanter.com/excel-discussion-misc-queries/226233-need-character-custom-format-force-upper-case.html)

Andrew C[_2_]

Need character for custom format to force upper case!
 
I am trying to mask the input into cells to force as uppercase only.

Max

Need character for custom format to force upper case!
 
Try this sub taken from a post by Tom Ogilvy
which will force uppercase in col A:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error goto ErrHandler
If Target.Column = 1 Then
Application.EnableEvents = false
Target.Value = UCase(Target.Value)
End if
ErrHandler:
Application.EnableEvents = True
End Sub

To implement: Right click on the tab of the sheet
where you want this behavior and select view code,
then paste in the above procedure

Adapt the target col to suit:
col A = 1, col B = 2, ...

Success? Click YES button below.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:25,000 Files:370 Subscribers:68
xdemechanik
---
"Andrew C" wrote:
I am trying to mask the input into cells to force as uppercase only.


Jacob Skaria

Need character for custom format to force upper case!
 
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Value = UCase(Target.Value)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Andrew C" wrote:

I am trying to mask the input into cells to force as uppercase only.



All times are GMT +1. The time now is 02:56 PM.

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