ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   DEFAULT TO UPPER CASE (https://www.excelbanter.com/excel-discussion-misc-queries/130729-default-upper-case.html)

Prasad Gopinath

DEFAULT TO UPPER CASE
 
How do i default all cells in the spread sheet to upper case?

Prasad

Jim Thomlinson

DEFAULT TO UPPER CASE
 
You can't really default to upper case but you can force it...

http://www.dailydoseofexcel.com/arch...ce-upper-case/
--
HTH...

Jim Thomlinson


"Prasad Gopinath" wrote:

How do i default all cells in the spread sheet to upper case?

Prasad


Gord Dibben

DEFAULT TO UPPER CASE
 
Turn on Caps Lock or use event code to change to UPPER case as you enter text.

This code operates on all sheets in the workbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Right-click on the Excel logo left of "File" on the menubar
or left end of Title Bar if window is not maximized.

Select "View Code". Copy/paste the code into that Thisworkbook module.

*******************************

To operate on just one worksheet use this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that Sheet
module.


Gord Dibben MS Excel MVP


On Wed, 14 Feb 2007 11:48:07 -0800, Prasad Gopinath
wrote:

How do i default all cells in the spread sheet to upper case?

Prasad



tankerman

DEFAULT TO UPPER CASE
 
Gord your vb works great it but how can I narrow it down to just one column
(I2:I250). There are several individuals using this sheet and some have less
computer smarts than I do which is not much.

"Gord Dibben" wrote:

Turn on Caps Lock or use event code to change to UPPER case as you enter text.

This code operates on all sheets in the workbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Right-click on the Excel logo left of "File" on the menubar
or left end of Title Bar if window is not maximized.

Select "View Code". Copy/paste the code into that Thisworkbook module.

*******************************

To operate on just one worksheet use this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that Sheet
module.


Gord Dibben MS Excel MVP


On Wed, 14 Feb 2007 11:48:07 -0800, Prasad Gopinath
wrote:

How do i default all cells in the spread sheet to upper case?

Prasad




David McRitchie

DEFAULT TO UPPER CASE
 
at the beginning of your code and BEFORE disabling event handling
add the following line.

if target.column < 3 then exit sub

additional aspects of changing letter case can be found in
http://www.mvps.org/dmcritchie/excel/proper.htm

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"tankerman" wrote in message ...
Gord your vb works great it but how can I narrow it down to just one column
(I2:I250). There are several individuals using this sheet and some have less
computer smarts than I do which is not much.

"Gord Dibben" wrote:

Turn on Caps Lock or use event code to change to UPPER case as you enter text.

This code operates on all sheets in the workbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Right-click on the Excel logo left of "File" on the menubar
or left end of Title Bar if window is not maximized.

Select "View Code". Copy/paste the code into that Thisworkbook module.

*******************************

To operate on just one worksheet use this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that Sheet
module.


Gord Dibben MS Excel MVP


On Wed, 14 Feb 2007 11:48:07 -0800, Prasad Gopinath
wrote:

How do i default all cells in the spread sheet to upper case?

Prasad






Gord Dibben

DEFAULT TO UPPER CASE
 
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Application.Intersect(Range("I2:I250"), Target) Is Nothing Then
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
End If
ErrHandler:
Application.EnableEvents = True
End Sub


Gord

On Sun, 18 Feb 2007 07:18:00 -0800, tankerman
wrote:

Gord your vb works great it but how can I narrow it down to just one column
(I2:I250). There are several individuals using this sheet and some have less
computer smarts than I do which is not much.

"Gord Dibben" wrote:

Turn on Caps Lock or use event code to change to UPPER case as you enter text.

This code operates on all sheets in the workbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Right-click on the Excel logo left of "File" on the menubar
or left end of Title Bar if window is not maximized.

Select "View Code". Copy/paste the code into that Thisworkbook module.

*******************************

To operate on just one worksheet use this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that Sheet
module.


Gord Dibben MS Excel MVP


On Wed, 14 Feb 2007 11:48:07 -0800, Prasad Gopinath
wrote:

How do i default all cells in the spread sheet to upper case?

Prasad





tankerman

DEFAULT TO UPPER CASE
 
Gord, works great, this discussion group has been a life saver since i found
it.

"Gord Dibben" wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Application.Intersect(Range("I2:I250"), Target) Is Nothing Then
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
End If
ErrHandler:
Application.EnableEvents = True
End Sub


Gord

On Sun, 18 Feb 2007 07:18:00 -0800, tankerman
wrote:

Gord your vb works great it but how can I narrow it down to just one column
(I2:I250). There are several individuals using this sheet and some have less
computer smarts than I do which is not much.

"Gord Dibben" wrote:

Turn on Caps Lock or use event code to change to UPPER case as you enter text.

This code operates on all sheets in the workbook.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

This is event code. Right-click on the Excel logo left of "File" on the menubar
or left end of Title Bar if window is not maximized.

Select "View Code". Copy/paste the code into that Thisworkbook module.

*******************************

To operate on just one worksheet use this code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that Sheet
module.


Gord Dibben MS Excel MVP


On Wed, 14 Feb 2007 11:48:07 -0800, Prasad Gopinath
wrote:

How do i default all cells in the spread sheet to upper case?

Prasad






All times are GMT +1. The time now is 07:01 PM.

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