Changing single column default to Upper case

G

Graham

Can I set the default for a single column in Excel 2000 to Upper case. I keep
a lot of address information in various spreadsheets and would like to
default the Post Town column to Upper case, ready to mail merge.
Thankyou
Graham
 
G

Graham

Many Thanks Anirudh - I have been using this as a "work around", but this
requires two columns, and I would like to have the text converted in a single
column, either when I type it in, or when it is pasted in from another sheet.
I collate info from many similar sheets, and want to try and get some
consistancy in appearance.
 
G

Gord Dibben

If you want to change to Upper Case as you enter data in the Post Town column
you could use a worksheet event.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column <> 1 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Target.Column number to be your Post Town column.

Right-click on the sheet tab and "View Code"

Paste the above into that module.


Gord Dibben Excel MVP
 
Top