#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default CAPITALISE

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default CAPITALISE

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub

Mikr

"Prasad Gopinath" wrote:

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default CAPITALISE

Mike

Thank you.

Prasad




"Mike H" wrote:

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub

Mikr

"Prasad Gopinath" wrote:

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default CAPITALISE

Mike,
If we wanted range of cells in a particular column say A1:A1000, could you
revise and post the code for it.?

"Mike H" wrote:

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub

Mikr

"Prasad Gopinath" wrote:

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default CAPITALISE

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


Gord Dibben MS Excel MVP

On Fri, 29 Feb 2008 12:41:02 -0800, murthy
wrote:

Mike,
If we wanted range of cells in a particular column say A1:A1000, could you
revise and post the code for it.?

"Mike H" wrote:

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub

Mikr

"Prasad Gopinath" wrote:

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default CAPITALISE

Thanks Gord Dibben,
I made the same chage at range and it did work for me. I am glad that you
confirmed the code revision I was thinking of.


"Gord Dibben" wrote:

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


Gord Dibben MS Excel MVP

On Fri, 29 Feb 2008 12:41:02 -0800, murthy
wrote:

Mike,
If we wanted range of cells in a particular column say A1:A1000, could you
revise and post the code for it.?

"Mike H" wrote:

Hi,

Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub

Mikr

"Prasad Gopinath" wrote:

How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default CAPITALISE

You can use a font (Balloon, Copperplate, etc.) that shows the text in uppercase. If you
have Excel 2000 or higher, you can see the fonts in their actual font with the font box on
the formatting toolbar. The text won't really be in uppercase, so if it's pasted elsewhere,
it will still be in the case in which it was originally entered.

Or you can use an event-fired macro that corrects the particular cells, columns, etc. that
you want in caps. Pasting this into the relevant sheet module will correct all entries in
column A to upper case:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then ' is this our column?
Target.Value = UCase(Target.Value) ' put it in upper case
End If
End Sub

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeyl.com
-----------------------------------------------------------------------
"Prasad Gopinath" <Prasad wrote in message
...
How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default CAPITALISE

Prased,

If you're going to use a macro, use Mike H's code. I forgot to disable events. It still
works, but isn't a good idea.

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeyl.com
-----------------------------------------------------------------------
"Earl Kiosterud" wrote in message
...
You can use a font (Balloon, Copperplate, etc.) that shows the text in uppercase. If you
have Excel 2000 or higher, you can see the fonts in their actual font with the font box on
the formatting toolbar. The text won't really be in uppercase, so if it's pasted
elsewhere, it will still be in the case in which it was originally entered.

Or you can use an event-fired macro that corrects the particular cells, columns, etc. that
you want in caps. Pasting this into the relevant sheet module will correct all entries in
column A to upper case:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then ' is this our column?
Target.Value = UCase(Target.Value) ' put it in upper case
End If
End Sub

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeyl.com
-----------------------------------------------------------------------
"Prasad Gopinath" <Prasad wrote in message
...
How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default CAPITALISE



"Earl Kiosterud" wrote:

Prased,

If you're going to use a macro, use Mike H's code. I forgot to disable events. It still
works, but isn't a good idea.

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeyl.com
-----------------------------------------------------------------------
"Earl Kiosterud" wrote in message
...
You can use a font (Balloon, Copperplate, etc.) that shows the text in uppercase. If you
have Excel 2000 or higher, you can see the fonts in their actual font with the font box on
the formatting toolbar. The text won't really be in uppercase, so if it's pasted
elsewhere, it will still be in the case in which it was originally entered.

Or you can use an event-fired macro that corrects the particular cells, columns, etc. that
you want in caps. Pasting this into the relevant sheet module will correct all entries in
column A to upper case:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then ' is this our column?
Target.Value = UCase(Target.Value) ' put it in upper case
End If
End Sub

--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeyl.com
-----------------------------------------------------------------------
"Prasad Gopinath" <Prasad wrote in message
...
How do I ensure that all the values typed in different fields are
capitalised? Please let me know if there si something we can do so that when
we type into a spread sheet the values automatically default to Uppercase.

Prasad Gopinath






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i capitalise text in an existing workbook craigs rus Excel Worksheet Functions 1 October 31st 06 07:56 PM
Trying to Capitalise on Input to Cells John Excel Worksheet Functions 3 June 23rd 06 03:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"